[llvm-dev] Opt can't find 'hello' pass
Joshua R Hilke via llvm-dev
llvm-dev at lists.llvm.org
Wed Feb 10 10:39:46 PST 2021
I’m just trying to run the hello world example from the LLVM Writing a Pass Tutorial (https://llvm.org/docs/WritingAnLLVMPass.html <https://llvm.org/docs/WritingAnLLVMPass.html>), but whenever I run:
$BUILD_DIR/bin/clang -c -emit-llvm hello.c
$BUILD_DIR/bin/opt -load $BUILD_DIR/lib/LLVMHello.so -hello < hello.bc > /dev/null
I get the following error:
bin/opt: unknown pass name ‘hello’
Which seems odd because if I run:
$BUILD_DIR/bin/opt -load $BUILD_DIR/lib/LLVMHello.so --help | grep hello
I get:
--hello - Hello World Pass
To build LLVM I’m running the following commands from my build directory:
cmake -G Ninja -DLLVM_ENABLE_PROJECTS=‘clang’ ../llvm
cmake --build .
Just to clarify, I’m not writing my own pass. Just trying to run the ‘hello’ pass that comes default when building LLVM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210210/d617102c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1846 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210210/d617102c/attachment.bin>
More information about the llvm-dev
mailing list