This is a sample of extracting function names from llvm bitcode.
- clang 3.5
- cmake
mkdir build && cd build
cmake ../ && make
- Create test file: test.cpp:
void test_function()
{
}
void test_function1()
{
}
- Generate llvm bitcode:
clang++-3.5 -c -emit-llvm test.cpp -o test.bc
- Run sample:
./llvm-list-functions-sample test.bc