[LLVMdev] Possible Bad Assertion in Value.cpp

Chris Lattner sabre at nondot.org
Fri Feb 15 14:58:12 PST 2008


>> You probably have an instruction that you removed from the module but
>> didn't delete.  The module dtor works fine: it uses
>> 'dropAllReferences' to clear the operands of instructions before
>> deleting the instructions themselves.
>>
> Okay.  I wasn't aware I had to delete unneeded values as well as  
> remove
> them.  I'll try that.

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 :)

-Chris



More information about the llvm-dev mailing list