[LLVMdev] Symbol not found in opt when using own pass

James Stanier j.stanier at sussex.ac.uk
Tue Apr 7 08:37:17 PDT 2009


Unfortunately I'm now at home and not my desk, but I'm already using the opt
tool which resides in the /Release/bin/ directory, so I don't think this is
the case.

The problem seems to explicitly occur when creating objects of header files
that aren't within the llvm or std library. I created a junk header file
called Rubbish.h with minimal content (a private integer and a get/set
method), and when I tried to create an object of that type:

   Rubbish r;

I got the exact same error as previously posted, no matter where in the .cpp
file I wrote it. This makes me think that, somehow, it can't find symbols
for any of my own #include header files, no matter what they happen to be. I
ran this by some people in my lab who couldn't seem to work it out either.

My project lies within /lib/Transforms/VSDGConstruct, next to the Hello
example. All of my .h and .cpp files are in there. Is there some possibility
that the header files should be elsewhere?

I am rather confused...

James


Luke Dalessandro-2 wrote:
> 
> Jamie, I've found that opt doesn't work quite right when using custom 
> loaded modules. If you use the opt in the build bin directory rather 
> than the installed one you shouldn't have this problem, i.e.,
> 
>    ~/path/to/build/Release/bin/opt -load whatever
> 
> rather than just
> 
>    opt -load whatever
> 
> I have absolutely no idea what the problem actually is, since the 
> workaround works and I haven't felt the need to track anything down. I 
> usually have a make target and set OPT appropriately.
> 

-- 
View this message in context: http://www.nabble.com/Symbol-not-found-in-opt-when-using-own-pass-tp22929616p22931875.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.




More information about the llvm-dev mailing list