[LLVMdev] Accessing metadata & creating DIVariable
Vedavyas Duggirala
vduggira at gmail.com
Mon Mar 28 14:36:43 PDT 2011
Hi,
I am wondering if someone can guide me in adding metadata to IR which
already contains some metadata. I am trying to add dbg.declare inst
for a local variable I added to a function. I used the DIBuilder to
build a DIVariable. When I try to compile llc fails with following
message.
llc: MCAsmStreamer.cpp:273: virtual
void<unnamed>::MCAsmStreamer::EmitLabel(llvm::MCSymbol*): Assertion
`Symbol->isUndefined() && "Cannot define a symbol twice!"' failed.
I can't figure out what is wrong, there are no obvious duplicate
entries. The original CU entry got replaced by the CU I created with
DIBuilder. Not sure, if changing the CU is the cause of error.
What is the right way to get a handle on the MDNode of the CompileUnit
in a Module ?
bye,
Vyas
More information about the llvm-dev
mailing list