diff options
author | van Hauser <vh@thc.org> | 2021-01-04 23:13:56 +0100 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2021-01-04 23:13:56 +0100 |
commit | 6c095b3937565e0e3c645cab706269e8c764701e (patch) | |
tree | 9601020625edc4c311e4fa1656651cdb74f767a5 /instrumentation/compare-transform-pass.so.cc | |
parent | d367b033a206187b9342c8003512512f62ff99b0 (diff) | |
download | afl++-6c095b3937565e0e3c645cab706269e8c764701e.tar.gz |
code format
Diffstat (limited to 'instrumentation/compare-transform-pass.so.cc')
-rw-r--r-- | instrumentation/compare-transform-pass.so.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/instrumentation/compare-transform-pass.so.cc b/instrumentation/compare-transform-pass.so.cc index 887970a0..da5cf7e9 100644 --- a/instrumentation/compare-transform-pass.so.cc +++ b/instrumentation/compare-transform-pass.so.cc @@ -68,7 +68,7 @@ class CompareTransform : public ModulePass { const char *getPassName() const override { #else - StringRef getPassName() const override { + StringRef getPassName() const override { #endif return "transforms compare functions"; @@ -106,23 +106,26 @@ bool CompareTransform::transformCmps(Module &M, const bool processStrcmp, FunctionCallee tolowerFn; #endif { + #if LLVM_VERSION_MAJOR < 9 - Constant * + Constant * #else - FunctionCallee + FunctionCallee #endif - c = M.getOrInsertFunction("tolower", Int32Ty, Int32Ty + c = M.getOrInsertFunction("tolower", Int32Ty, Int32Ty #if LLVM_VERSION_MAJOR < 5 - , - NULL + , + NULL #endif - ); + ); #if LLVM_VERSION_MAJOR < 9 - tolowerFn = cast<Function>(c); + tolowerFn = cast<Function>(c); #else - tolowerFn = c; + tolowerFn = c; #endif + } + /* iterate over all functions, bbs and instruction and add suitable calls to * strcmp/memcmp/strncmp/strcasecmp/strncasecmp */ for (auto &F : M) { |