<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’m trying to debug DebugInstrumentation.cpp, and I got the following errors.  I don’t know what to make of them.  The constructor for DILocation requires 5 arguments, and I don’t know what I would use as the arguments if I were to correct this code.  Also, the type “DIDescriptor” apparently doesn’t exist: has it been renamed?  What’s going on?<div class=""><br class=""></div><div class="">Thanks,</div><div class="">Peter Finn</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">llvm[2]: Compiling DebugInstrumentation.cpp for Debug+Asserts build</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/DebugInstrumentation/DebugInstrumentation.cpp:170:16: </b><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class=""><b class="">error: </b></span><b class="">no matching constructor for</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">      initialization of 'llvm::DILocation'</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    DILocation Loc (Dbg);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">               ^    ~~~</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1128:7: note: </b>candidate constructor (the implicit copy constructor) not</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">      viable: no known conversion from 'llvm::MDNode *' to 'const llvm::DILocation' for 1st argument</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">class DILocation : public MDNode {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">      ^</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1132:3: note: </b>candidate constructor not viable: requires 5 arguments, but</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">      1 was provided</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  DILocation(LLVMContext &C, StorageType Storage, unsigned Line,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">  ^</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/DebugInstrumentation/DebugInstrumentation.cpp:243:9: </b><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class=""><b class="">error: </b></span><b class="">unknown type name</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">      'DIDescriptor'; did you mean 'Intrinsic::IITDescriptor'?</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">        DIDescriptor DIG(cast<MDNode>(NMD->getOperand(i)));</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">        ^~~~~~~~~~~~</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class="">        Intrinsic::IITDescriptor</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/Intrinsics.h:80:10: note: </b>'Intrinsic::IITDescriptor' declared here</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  struct IITDescriptor {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">         ^</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/DebugInstrumentation/DebugInstrumentation.cpp:243:22: </b><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class=""><b class="">error: </b></span><b class="">no matching constructor for</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">      initialization of 'llvm::Intrinsic::IITDescriptor'</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">        DIDescriptor DIG(cast<MDNode>(NMD->getOperand(i)));</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">                     ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/Intrinsics.h:80:10: note: </b>candidate constructor (the implicit copy constructor) not viable: no</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">      known conversion from 'typename cast_retty<MDNode, MDNode *>::ret_type' (aka 'llvm::MDNode *') to 'const llvm::Intrinsic::IITDescriptor' for</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">      1st argument</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  struct IITDescriptor {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">         ^</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/Intrinsics.h:80:10: note: </b>candidate constructor (the implicit move constructor) not viable: no</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">      known conversion from 'typename cast_retty<MDNode, MDNode *>::ret_type' (aka 'llvm::MDNode *') to 'llvm::Intrinsic::IITDescriptor' for 1st</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">      argument</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  struct IITDescriptor {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">         ^</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/Intrinsics.h:80:10: note: </b>candidate constructor (the implicit default constructor) not viable:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">      requires 0 arguments, but 1 was provided</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/DebugInstrumentation/DebugInstrumentation.cpp:246:13: </b><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class=""><b class="">error: </b></span><b class="">no matching conversion for</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">      functional-style cast from 'llvm::MDNode *' to 'llvm::DIGlobalVariable'</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">        if (DIGlobalVariable(NMD->getOperand(i)).getGlobal() == GV) {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1772:7: note: </b>candidate constructor (the implicit copy constructor) not</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">      viable: no known conversion from 'llvm::MDNode *' to 'const llvm::DIGlobalVariable' for 1st argument</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">class DIGlobalVariable : public DIVariable {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">      ^</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1779:3: note: </b>candidate constructor not viable: requires 6 arguments, but</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">      1 was provided</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  DIGlobalVariable(LLVMContext &C, StorageType Storage, unsigned Line,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">  ^</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/DebugInstrumentation/DebugInstrumentation.cpp:247:28: </b><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class=""><b class="">error: </b></span><b class="">no matching constructor for</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">      initialization of 'llvm::DIGlobalVariable'</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">          DIGlobalVariable Var(NMD->getOperand(i));</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">                           ^   ~~~~~~~~~~~~~~~~~~</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1772:7: note: </b>candidate constructor (the implicit copy constructor) not</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">      viable: no known conversion from 'llvm::MDNode *' to 'const llvm::DIGlobalVariable' for 1st argument</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">class DIGlobalVariable : public DIVariable {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">      ^</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1779:3: note: </b>candidate constructor not viable: requires 6 arguments, but</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">      1 was provided</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  DIGlobalVariable(LLVMContext &C, StorageType Storage, unsigned Line,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">  ^</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/DebugInstrumentation/DebugInstrumentation.cpp:256:20: </b><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class=""><b class="">error: </b></span><b class="">no matching constructor for</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">      initialization of 'llvm::DILocation'</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">        DILocation Loc (Dbg);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">                   ^    ~~~</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1128:7: note: </b>candidate constructor (the implicit copy constructor) not</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">      viable: no known conversion from 'llvm::MDNode *' to 'const llvm::DILocation' for 1st argument</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">class DILocation : public MDNode {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">      ^</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><b class="">/Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1132:3: note: </b>candidate constructor not viable: requires 5 arguments, but</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">      1 was provided</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  DILocation(LLVMContext &C, StorageType Storage, unsigned Line,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);" class=""><b class="">  ^</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">6 errors generated.</div></div></body></html>