我想写一个llvm传递,并将示例测试为http://llvm.org/docs/WritingAnLLVMPass.html。但它无法运行传递,结果如下:
ubuntu@ubuntu:~/Documents$ opt -load llvm-5.0.0.src/build/lib/LLVMHello.so -hello < Test/hello.bc > /dev/null
Error opening 'llvm-5.0.0.src/build/lib/LLVMHello.so': llvm-5.0.0.src/build/lib/LLVMHello.so: undefined symbol: _ZNK4llvm12FunctionPass17createPrinterPassERNS_11raw_ostreamERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
-load request ignored.
opt: Unknown command line argument '-hello'. Try: 'opt -help'
opt: Did you mean '-help'?
ubuntu@ubuntu:~/Documents$ opt -version
LLVM (http://llvm.org/):
LLVM version 5.0.0
DEBUG build with assertions.
Default target: x86_64-unknown-linux-gnu
Host CPU: broadwell