[LLVMdev] Use still stuck around after Def is destroyed:
ret val
retval386 at gmail.com
Wed Oct 26 12:18:28 PDT 2011
I made a GlobalVariable that is of type ConstantArray. For one of it's
elements I assigned it the ConstantExpr::getBitCast of another
GlobalVariable(the "shadow pointer" mentioned). This gives me:
While deleting: i32 (i32)** %Shadow Variable for ptr1
Use still stuck around after Def is destroyed:i8* bitcast (i32
(i32)** @"Shadow Variable for ptr1" to i8*)
opt: Value.cpp:75: virtual llvm::Value::~Value(): Assertion
`use_empty() && "Uses remain when a value is destroyed!"' failed.
I only see this after my Pass' runOnModule() method is done. I'm not
sure what I'm doing wrong, this seems like a legitimate actions. I
also cant come up with another way to do this.
Any advice?
Thank you
More information about the llvm-dev
mailing list