Run LLVM pass with opt
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have just started to work with LLVM. I have wrote my own Hello pass, which worked fine. Now I want to run opt with the stack protector pass, from StackProtector.cpp, but I am having trouble with that. When I look at the source code, it looks like I should use the flag -stack-protector: INITIALIZE_PASS(StackProtector, "stack-protector", "Insert stack protectors", false, false) But this flag is not recognized by opt. I am not sure which file to "load", as it is not as simple as loading my own LLVMHello.so file and I could not find a