[LLVMdev] range-analysis in Function Pass on Eclipse with CMake

dw dw.dev.mailing at gmail.com
Mon Sep 23 17:33:18 PDT 2013


I currently write my own LLVM (function) pass and intend to use the
following project to enable the use of range analysis information in my
code: https://code.google.com/p/range-analysis/.

Since I use Eclipse (with CMake) to build LLVM I did the following:

1. Provide each subfolder with a CMakeLists.txt 	(add_llvm_loadable_module).
2. Re-create the CMake config (cmake ../llvm -G "Eclipse CDT4 - Unix
Makefiles"), re-open it in Eclipse.
4. Fix some minor issues with range-analysis (some symbols were renamed
in newer LLVM releases).
5. Add the necessary code to my own pass, almost verbatim from

Everything compiles fine, but loading the pass in LLVM gives me the
following error:

> /opt/llvm/bin/opt: symbol lookup error: ./build/lib/RangeAnalysis.so: undefined symbol: _ZN4llvm13ConstantRangeC1ENS_5APIntES1_
> error: unable to interface with target machine

I use LLVM 3.4svn on Ubuntu x64.

Do I miss a specific library?


More information about the llvm-dev mailing list