diff options
Diffstat (limited to 'instrumentation/compare-transform-pass.so.cc')
-rw-r--r-- | instrumentation/compare-transform-pass.so.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/instrumentation/compare-transform-pass.so.cc b/instrumentation/compare-transform-pass.so.cc index 496d69fc..36149f35 100644 --- a/instrumentation/compare-transform-pass.so.cc +++ b/instrumentation/compare-transform-pass.so.cc @@ -54,6 +54,12 @@ #define nullptr 0 #endif +#if LLVM_MAJOR >= 19 + #define STARTSWITH starts_with +#else + #define STARTSWITH startswith +#endif + #include <set> #include "afl-llvm-common.h" @@ -532,10 +538,10 @@ bool CompareTransform::transformCmps(Module &M, const bool processStrcmp, } if (!isSizedcmp) needs_null = true; - if (Callee->getName().startswith("g_") || - Callee->getName().startswith("curl_") || - Callee->getName().startswith("Curl_") || - Callee->getName().startswith("xml")) + if (Callee->getName().STARTSWITH("g_") || + Callee->getName().STARTSWITH("curl_") || + Callee->getName().STARTSWITH("Curl_") || + Callee->getName().STARTSWITH("xml")) nullCheck = true; Value *sizedValue = isSizedcmp ? callInst->getArgOperand(2) : NULL; |