[llvm-dev] problem with Value->dump()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] problem with Value->dump()

Chris Lattner via llvm-dev
Hello,

I am building a pass. The pass compiled well. But when I test it, I get a linking error.
Here, what I am doing:

clang -g3 -shared -fno-rtti -fPIC -o mypass.so mypass.cpp //mypass has Value->dump();
opt -load mypass.so -myppass test.ll

I get:

opt: symbol lookup error: mypass.so: undefined symbol: _ZNK4llvm5Value4dumpEv

unable to link/find llvm/Value/dump
--
Abid M. Malik
******************************************************
"I have learned silence from the talkative, toleration from the intolerant, and kindness from the unkind"---Gibran
"Success is not for the chosen few, but for the few who choose" --- John Maxwell
"Being a good person does not depend on your religion or status in life, your race or skin color, political views or culture. IT DEPENDS ON HOW GOOD YOU TREAT OTHERS"--- Abid
"The Universe is talking to us, and the language of the Universe is mathematics."----Abid
 

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] problem with Value->dump()

Chris Lattner via llvm-dev
dump functions are only available if LLVM was built with !NDEBUG or with LLVM_ENABLE_DUMP (so usually a debug build, maybe an Asserts build, not generally in release builds) - so you might need to find opt built with this option or build it yourself with this option

On Sat, Jan 18, 2020 at 7:41 AM Abid Malik via llvm-dev <[hidden email]> wrote:
Hello,

I am building a pass. The pass compiled well. But when I test it, I get a linking error.
Here, what I am doing:

clang -g3 -shared -fno-rtti -fPIC -o mypass.so mypass.cpp //mypass has Value->dump();
opt -load mypass.so -myppass test.ll

I get:

opt: symbol lookup error: mypass.so: undefined symbol: _ZNK4llvm5Value4dumpEv

unable to link/find llvm/Value/dump
--
Abid M. Malik
******************************************************
"I have learned silence from the talkative, toleration from the intolerant, and kindness from the unkind"---Gibran
"Success is not for the chosen few, but for the few who choose" --- John Maxwell
"Being a good person does not depend on your religion or status in life, your race or skin color, political views or culture. IT DEPENDS ON HOW GOOD YOU TREAT OTHERS"--- Abid
"The Universe is talking to us, and the language of the Universe is mathematics."----Abid
 
_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev