[llvm-commits] [llvm-gcc-4.2] r81586 - in /llvm-gcc-4.2/trunk/gcc: llvm-debug.cpp llvm-debug.h

Devang Patel dpatel at apple.com
Mon Sep 21 10:18:13 PDT 2009


Hi Daniel,

On Sep 19, 2009, at 12:32 PM, Daniel Dunbar wrote:

>
> Can you explain this line below? Its reconstructing a type in the case
> when something deleted the metadata which was in the type cache.
> Should that ever happen?

Yes. It is possible that the MDNode describing type disappear.

> Can we not maintain enough invariants to
> allow us to use an AssertingVH instead?

It is not an error if the MDNode disappears.
>
> I went ahead and moved clang over to an AssertingVH in r8232{0,1}, so
> that we will at least get asserts if we try something funny (which
> does, indeed, assert for PR4894).
>
>> +       if (Value *M = I->second)
>> +         return DIType(cast<MDNode>(M));
>
> - Daniel

-
Devang




More information about the llvm-commits mailing list