LLVM - Run Own Pass automatically with clang

老子叫甜甜 提交于 2019-12-01 04:03:15

The proper way to do this would be to make clang add your pass to the pass manager it builds. See clang/lib/CodeGen/BackendUtil.cpp:void EmitAssemblyHelper::CreatePasses() for how it's handled for the sanitizers.

You can run your own pass with clang directly with -Xclang.

clang++ -Xclang -load -Xclang ./libmypass.so input.cpp

Source

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!