[LLVM_PASS]build pass on Windows vs2017

  • 推荐https://blog.csdn.net/asmcvc/article/details/80105190

最后的效果

opt -help

...
    -mypass                                         - Print all function names.
...
λ opt -mypass C:\Users\pcy19\Desktop\test.ll -debug-pass=Structure
WARNING: You're attempting to print out a bitcode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bitcode first-hand, you
can force output with the `-f' option.

Pass Arguments:  -targetlibinfo -tti -targetpassconfig -mypass -verify
Target Library Information
Target Transform Information
Target Pass Configuration
  ModulePass Manager
    FunctionPass Manager
      Print all function names.
      Module Verifier
Hello: foo
Hello: main

编译为dll

  • https://www.chinapyg.com/forum.php?mod=viewthread&tid=119803&page=1&extra=

  • https://blog.csdn.net/asmcvc/article/details/80105237

你可能感兴趣的:([LLVM_PASS]build pass on Windows vs2017)