[LLVMdev] Strange Errors

Eric Christopher echristo at gmail.com
Fri Jun 26 09:35:46 PDT 2015


The debug metadata format has changed quite a bit since that code was
written. I'd suggest taking a look in top of tree to see the format of how
things are working together now. DwarfDebug.cpp will have quite a bit of
information as will DIBuilder.h

-eric

On Fri, Jun 26, 2015 at 9:33 AM Peter Finn <peterdfinn at icloud.com> wrote:

> 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?
>
> Thanks,
> Peter Finn
>
> llvm[2]: Compiling DebugInstrumentation.cpp for Debug+Asserts build
> */Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/DebugInstrumentation/DebugInstrumentation.cpp:170:16:
> **error: **no matching constructor for*
> *      initialization of 'llvm::DILocation'*
>     DILocation Loc (Dbg);
> *               ^    ~~~*
> */Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1128:7:
> note: *candidate constructor (the implicit copy constructor) not
>       viable: no known conversion from 'llvm::MDNode *' to 'const
> llvm::DILocation' for 1st argument
> class DILocation : public MDNode {
> *      ^*
> */Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1132:3:
> note: *candidate constructor not viable: requires 5 arguments, but
>       1 was provided
>   DILocation(LLVMContext &C, StorageType Storage, unsigned Line,
> *  ^*
> */Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/DebugInstrumentation/DebugInstrumentation.cpp:243:9:
> **error: **unknown type name*
> *      'DIDescriptor'; did you mean 'Intrinsic::IITDescriptor'?*
>         DIDescriptor DIG(cast<MDNode>(NMD->getOperand(i)));
> *        ^~~~~~~~~~~~*
>         Intrinsic::IITDescriptor
> */Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/Intrinsics.h:80:10:
> note: *'Intrinsic::IITDescriptor' declared here
>   struct IITDescriptor {
> *         ^*
> */Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/DebugInstrumentation/DebugInstrumentation.cpp:243:22:
> **error: **no matching constructor for*
> *      initialization of 'llvm::Intrinsic::IITDescriptor'*
>         DIDescriptor DIG(cast<MDNode>(NMD->getOperand(i)));
> *                     ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
> */Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/Intrinsics.h:80:10:
> note: *candidate constructor (the implicit copy constructor) not viable:
> no
>       known conversion from 'typename cast_retty<MDNode, MDNode
> *>::ret_type' (aka 'llvm::MDNode *') to 'const
> llvm::Intrinsic::IITDescriptor' for
>       1st argument
>   struct IITDescriptor {
> *         ^*
> */Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/Intrinsics.h:80:10:
> note: *candidate constructor (the implicit move constructor) not viable:
> no
>       known conversion from 'typename cast_retty<MDNode, MDNode
> *>::ret_type' (aka 'llvm::MDNode *') to 'llvm::Intrinsic::IITDescriptor'
> for 1st
>       argument
>   struct IITDescriptor {
> *         ^*
> */Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/Intrinsics.h:80:10:
> note: *candidate constructor (the implicit default constructor) not
> viable:
>       requires 0 arguments, but 1 was provided
> */Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/DebugInstrumentation/DebugInstrumentation.cpp:246:13:
> **error: **no matching conversion for*
> *      functional-style cast from 'llvm::MDNode *' to
> 'llvm::DIGlobalVariable'*
>         if (DIGlobalVariable(NMD->getOperand(i)).getGlobal() == GV) {
> *            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
> */Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1772:7:
> note: *candidate constructor (the implicit copy constructor) not
>       viable: no known conversion from 'llvm::MDNode *' to 'const
> llvm::DIGlobalVariable' for 1st argument
> class DIGlobalVariable : public DIVariable {
> *      ^*
> */Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1779:3:
> note: *candidate constructor not viable: requires 6 arguments, but
>       1 was provided
>   DIGlobalVariable(LLVMContext &C, StorageType Storage, unsigned Line,
> *  ^*
> */Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/DebugInstrumentation/DebugInstrumentation.cpp:247:28:
> **error: **no matching constructor for*
> *      initialization of 'llvm::DIGlobalVariable'*
>           DIGlobalVariable Var(NMD->getOperand(i));
> *                           ^   ~~~~~~~~~~~~~~~~~~*
> */Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1772:7:
> note: *candidate constructor (the implicit copy constructor) not
>       viable: no known conversion from 'llvm::MDNode *' to 'const
> llvm::DIGlobalVariable' for 1st argument
> class DIGlobalVariable : public DIVariable {
> *      ^*
> */Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1779:3:
> note: *candidate constructor not viable: requires 6 arguments, but
>       1 was provided
>   DIGlobalVariable(LLVMContext &C, StorageType Storage, unsigned Line,
> *  ^*
> */Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/DebugInstrumentation/DebugInstrumentation.cpp:256:20:
> **error: **no matching constructor for*
> *      initialization of 'llvm::DILocation'*
>         DILocation Loc (Dbg);
> *                   ^    ~~~*
> */Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1128:7:
> note: *candidate constructor (the implicit copy constructor) not
>       viable: no known conversion from 'llvm::MDNode *' to 'const
> llvm::DILocation' for 1st argument
> class DILocation : public MDNode {
> *      ^*
> */Users/peterfinn/Desktop/llvm_trunk_2/include/llvm/IR/DebugInfoMetadata.h:1132:3:
> note: *candidate constructor not viable: requires 5 arguments, but
>       1 was provided
>   DILocation(LLVMContext &C, StorageType Storage, unsigned Line,
> *  ^*
> 6 errors generated.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150626/2ce01cc7/attachment.html>


More information about the llvm-dev mailing list