Skip to content

Commit cf1ff22

Browse files
committed
[clang] Deduplicate the logic between StringMapEntry.first() and StringMapEntry.getKey().
1 parent 6c9bbbc commit cf1ff22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/ADT/StringMapEntry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class StringMapEntry final : public StringMapEntryStorage<ValueTy> {
117117
}
118118

119119
StringRef first() const {
120-
return StringRef(getKeyData(), this->getKeyLength());
120+
return getKey();
121121
}
122122

123123
/// Create a StringMapEntry for the specified key construct the value using

0 commit comments

Comments
 (0)