[llvm-dev] Compiler error after cloning function in debug mode

Simone Atzeni via llvm-dev llvm-dev at lists.llvm.org
Mon Aug 29 09:18:31 PDT 2016


Hi all,

I am implementing a function pass for instrumenting the code.
I need to clone the functions in a module and I have done that with the “CloneFunction” method.
It seems to work correctly, however when I compile using "-g”, I get the following error:

"inlinable function call in a function with debug info must have a !dbg location”

I am using LLVM/Clang from trunk, and I noticed that in the implementation of CloneFunction there is not anymore the call to “CloneDebugInfoMetadata”.

Could it be that the problem? Do I have to copy the metadata manually now?

Thanks.
Best,
Simone


More information about the llvm-dev mailing list