Why is mangling different for separate compilation?
Joakim via Digitalmars-d
digitalmars-d at puremagic.com
Sat Feb 27 02:18:53 PST 2016
On Saturday, 27 February 2016 at 09:11:02 UTC, Atila Neves wrote:
> On Saturday, 27 February 2016 at 03:51:00 UTC, Walter Bright
> wrote:
>> On 2/26/2016 4:45 AM, Atila Neves wrote:
>>> '_D3bar16__unittestL2_531FZv'
>>> '_D3bar14__unittestL2_1FZv'
>>
>> It uses a sequence number to generate different ids for the
>> unit tests. In the former, it's the 531st unit test, the
>> latter, the first.
>
> In both cases though, there's only one unit test. The only
> difference is how the files were compiled.
531 is the number across all modules, because they weren't
separately compiled.
> What's the number after "bar" then? It's 16 in one case and 14
> in the other.
That's the length of the next token: __unittestL2_531 is 16
characters long, while __unittestL2_1 is 14 characters long. The
FZv characters at the end are usually some kind of type mangling,
I believe.
More information about the Digitalmars-d
mailing list