harvard-acc / LLVM-Tracer

An LLVM pass to profile dynamic LLVM IR instructions and runtime values
Other
135 stars 35 forks source link

Fix compatibility with LLVM 3.5 #21

Closed rgly closed 7 years ago

rgly commented 7 years ago

Recent updates broke compatibility with LLVM 3.5, reported in #20 Made 3 fixes for the issue:

  1. Add cl::OptionCategory in GetLabelStmtsCat because CommonOptionsParser() requires it in LLVM 3.5
  2. Use unique_ptr to keep pointers from actionfactory(), which returns a unique_ptr in LLVM 3.5, instead of a raw pointer.
  3. Include "llvm/DebugInfo.h" or "llvm/IR/DebugInfo.h" according to the LLVM version.
xyzsam commented 7 years ago

Thanks @rgly!