Skip to content

Commit 80f38fb

Browse files
authored
[clang] [NFC] Deduplicate the logic between StringMapEntry.first() and StringMapEntry.getKey() (#113735)
1 parent eb53d08 commit 80f38fb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/include/llvm/ADT/StringMapEntry.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ class StringMapEntry final : public StringMapEntryStorage<ValueTy> {
116116
return reinterpret_cast<const char *>(this + 1);
117117
}
118118

119-
StringRef first() const {
120-
return StringRef(getKeyData(), this->getKeyLength());
121-
}
119+
StringRef first() const { return getKey(); }
122120

123121
/// Create a StringMapEntry for the specified key construct the value using
124122
/// \p InitiVals.

0 commit comments

Comments
 (0)