[llvm] [Core] Skip over target name in intrinsic name lookup (PR #109971)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 10:27:05 PDT 2024
================
@@ -248,6 +250,9 @@ int llvm::Intrinsic::lookupLLVMIntrinsicByName(ArrayRef<const char *> NameTable,
// identical. By using strncmp we consider names with differing suffixes to
// be part of the equal range.
size_t CmpEnd = 4; // Skip the "llvm" component.
+ if (!Target.empty())
+ CmpEnd += 1 + Target.size(); // skip the .target component.
----------------
arsenm wrote:
```suggestion
CmpEnd += Target.size() +1; // skip the .target component.
```
https://github.com/llvm/llvm-project/pull/109971
More information about the llvm-commits
mailing list