<div dir="ltr">Hi all,<div><br></div><div>So I started working on upgrading our tool from LLVM 3.5 to 3.6, and I would appreciate your help with the new metadata API.</div><div><br></div><div>In particular, I currently have the following snippet of code:</div><div><div>// ci is llvm.debug.value instruction</div><div><div>    const llvm::MDNode* m1 = dyn_cast<const llvm::MDNode>(ci.getArgOperand(0));</div><div>    const llvm::MDNode* m2 = dyn_cast<const llvm::MDNode>(ci.getArgOperand(2));</div><div>    assert(m1 && "Expected metadata node in first argument to llvm.dbg.value.");</div><div>    assert(m2 && "Expected metadata node in third argument to llvm.dbg.value.");</div><div>    const llvm::MDString* m3 = dyn_cast<const llvm::MDString>(m2->getOperand(2));</div><div>    assert(m3 && "Expected metadata string in the third argument to metadata node.");</div><div><br></div><div>   if (const llvm::Value* V = m1->getOperand(0)) { // this does not compile any more!</div><div>   ... Need Type of Value V here.</div><div>    }<br></div></div><div><br></div><div>In LLVM 3.6, the expression in the if condition does not compile any more.</div><div><br></div><div>What I basically need in the if body is to access the type (Type) of the variable specified in the llvm.debug.value metadata. How do I access its type using the new metadata API?</div><div><br></div><div>Any pointers would be greatly appreciated.</div><div><br></div><div>Thanks!</div><div>-- Zvonimir</div></div></div>