Fix llvm api so it works with older LLVM version (#1964)
* aa * fix * fix * fmt * fmt
This commit is contained in:
parent
91778961da
commit
cd12546748
@ -93,7 +93,11 @@ class CtxPass : public ModulePass {
|
||||
private:
|
||||
bool isLLVMIntrinsicFn(StringRef &n) {
|
||||
// Not interested in these LLVM's functions
|
||||
#if LLVM_VERSION_MAJOR >= 18
|
||||
if (n.starts_with("llvm.")) {
|
||||
#else
|
||||
if (n.startswith("llvm.")) {
|
||||
#endif
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -101,9 +101,15 @@ class DumpCfgPass : public ModulePass {
|
||||
private:
|
||||
bool isLLVMIntrinsicFn(StringRef &n) {
|
||||
// Not interested in these LLVM's functions
|
||||
#if LLVM_VERSION_MAJOR >= 18
|
||||
if (n.starts_with("llvm.")) {
|
||||
#else
|
||||
if (n.startswith("llvm.")) {
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user