[llvm] r187213 - Add preliminary support for hashing DIEs and breaking them into

Eric Christopher echristo at gmail.com
Mon Jul 29 15:26:43 PDT 2013


>>>> +  // For types that we'd like to move to type units or ODR check go ahead
>>>> +  // and either move the types out or add the ODR attribute now.
>>>> +  // FIXME: Do type splitting.
>>>> +  for (unsigned i = 0, e = TypeUnits.size(); i != e; ++i) {
>>>> +    MD5 Hash;
>>>> +    DIE *Die = TypeUnits[i];
>>>> +    // If we're in C++ and we want to generate the hash then go ahead and do
>>>> +    // that now.
>>>
>>> That phrasing leads to the question "And if we're not in C++ and want
>>> to generate a hash?" - my understanding is that we never want to
>>> generate a hash when we're not in C++ (because C has no ODR-like
>>> thing), but the comment reads a bit oddly if that's the intent. Not
>>> sure of the right wording yet.
>>
>> If you come up with one... :)
>
> // If we're dealing with a language with unique (ODR) types, hash any of those
>
> (this isn't great in that it doesn't describe the "if we want to"
> (which I suppose refers to the flag - which is only temporary) and C++
> doesn't actually talk about "ODR types", but I think it still gets the
> idea across)
>

Back to this real fast, I'm not sure I like that wording because I
would imagine there are (or will be) languages that aren't C++ and
also have something analogous to the ODR and the ODR computation here
is very C++ specific (and uses some C++ knowledge to minimize the
cases more).

I've done something in r187385, let me know how you like it.

-eric



More information about the llvm-commits mailing list