[LLVMdev] Possible Bad Assertion in Value.cpp

John Criswell criswell at cs.uiuc.edu
Fri Feb 15 15:11:07 PST 2008


Chris Lattner wrote:
> On Feb 15, 2008, at 3:01 PM, John Criswell wrote:
>
>   
>>> The convention is that 'remove' unlinks the object from the IR, and
>>> 'erase' does remove and deletes the result.
>>>
>>> If someone wants to clarify this behavior in http://llvm.org/docs/ProgrammersManual.html#common
>>> , it would be nice :)
>>>
>>>       
>> No, I understood that part (granted, I read DoxyGen).  The part I
>> didn't
>> understand is that I'm required to erase an instruction that should
>> have
>> no more uses before deleting the Module.
>>     
>
> That's what the assertion is telling you (poorly) :).  It is saying
> that there is something that uses a value that is attempting to be
> deleted.  It doesn't know the context, so it can't tell you that the
> user is something that was unlinked but not deleted.
>
> If you write your code as an llvm pass, you should automatically get
> notified of this stuff in a debug build.  If you can't do that,
> manually interfacing to the LeakDetector can help.
>   
It is an LLVM pass, it's a debug build, and the only assertion I got was 
the one in ~Value().

Should there have been an earlier assertion?

-- John T.

> -Chris
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>   




More information about the llvm-dev mailing list