[llvm] [LLVM] Fix an ASAN error in `lookupLLVMIntrinsicByName` (PR #147444)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 9 05:31:17 PDT 2025


jurahul wrote:

I can also do:

```
LHSStr = IntrinsicNameTable[LHS].data();
```

without adding the `getCString` API, but that again introduces a redundant strlen() computation as a part of ` IntrinsicNameTable[LHS]`. Note that `llvm::StringTable` is a table of null terminated strings, so `getCString` should be safe. We can rename it to something else if there is a better suggestion. 

https://github.com/llvm/llvm-project/pull/147444


More information about the llvm-commits mailing list