opt -mypass but when I try to run it with clang, I always get an error - unknown argument: '-mypass'. Please help me for the same. I would be really grateful._______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
On Jan 11, 2018, at 6:28 PM, 陳韋任 <chenwj...@g2.nctu.edu.tw> wrote:-mllvm
Hello,I have tried giving this option like thisclang -c -emit-llvm -mllvm -rdetector hello.c -c -o hello.bcbut I am getting error " Unknown command line argument '-rdetector’.”Although same option work with opt -opt -rdetector hello.ll
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
You need to use RegisterStandardPasses to add it to the default pipeline automatically. You can find an example here:
David
The SimplePass example is intended to be built out of tree, so I’ve no idea what happens if you try building it in tree. I wouldn’t expect to see it in the opt --help output, because it doesn’t define its own command-line options, it just adds itself to the default optimiser pipeline (at the end, and even if you’re running at -O0). You can see that it works by building it with its own CMake build system and then passing -Xclang -load -Xclang ./SimplePass.so to your clang command line.