[llvm] [ObjCopy] Use StringRef::starts_with (NFC) (PR #139408)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat May 10 14:12:21 PDT 2025
kazutakahirata wrote:
@MaskRay
> Can use consume_front
Yes, I've thought about, but I wasn't sure if the use of a temporary variable is elegant. Thoughts?
```
StringRef Tmp = Sym.Name;
if (Tmp.consumeFront(Config.SymbolsPrefixRemove))
Sym.Name = Tmp;
```
https://github.com/llvm/llvm-project/pull/139408
More information about the llvm-commits
mailing list