Skip to content

Commit

Permalink
fix compilation error with llvm 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hexcoder- committed Aug 7, 2019
1 parent dc2c46e commit a6fe8ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions llvm_mode/compare-transform-pass.so.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ bool CompareTransform::transformCmps(Module &M, const bool processStrcmp, const
, nullptr
#endif
);
#if LLVM_VERSION_MAJOR < 9
Function* tolowerFn = cast<Function>(c);
#else
FunctionCallee tolowerFn = c;
#endif

/* iterate over all functions, bbs and instruction and add suitable calls to strcmp/memcmp/strncmp/strcasecmp/strncasecmp */
for (auto &F : M) {
Expand Down

0 comments on commit a6fe8ae

Please sign in to comment.