[llvm] [DebugNames] Compare TableEntry names more efficiently (PR #79759)
Alexander Yermolovich via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 12:25:39 PST 2024
================
@@ -543,6 +543,19 @@ class DWARFDebugNames : public DWARFAcceleratorTable {
return StrData.getCStr(&Off);
}
+ /// Compares the name of this entry against Target, returning true if they
+ /// are equal. This is helpful is hot code paths that do not need the length
+ /// of the name.
+ bool sameNameAs(StringRef Target) const {
----------------
ayermolo wrote:
Is this going to be used elsewhere? If not maybe reduce scope and move to cpp as static?
https://github.com/llvm/llvm-project/pull/79759
More information about the llvm-commits
mailing list