Skip to content

Conversation

@bricknerb
Copy link
Contributor

Zero behavior diff.

@llvmbot
Copy link
Member

llvmbot commented Oct 25, 2024

@llvm/pr-subscribers-llvm-adt

Author: Boaz Brickner (bricknerb)

Changes

Zero behavior diff.


Full diff: https://github.com/llvm/llvm-project/pull/113735.diff

1 Files Affected:

  • (modified) llvm/include/llvm/ADT/StringMapEntry.h (+1-1)
diff --git a/llvm/include/llvm/ADT/StringMapEntry.h b/llvm/include/llvm/ADT/StringMapEntry.h
index 98b51cc1aebd59..a3ff2415869be6 100644
--- a/llvm/include/llvm/ADT/StringMapEntry.h
+++ b/llvm/include/llvm/ADT/StringMapEntry.h
@@ -117,7 +117,7 @@ class StringMapEntry final : public StringMapEntryStorage<ValueTy> {
   }
 
   StringRef first() const {
-    return StringRef(getKeyData(), this->getKeyLength());
+    return getKey();
   }
 
   /// Create a StringMapEntry for the specified key construct the value using

@github-actions
Copy link

github-actions bot commented Oct 25, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Collaborator

@dwblaikie dwblaikie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good - please add [NFC] to the title

@bricknerb bricknerb changed the title [clang] Deduplicate the logic between StringMapEntry.first() and StringMapEntry.getKey() [clang] [NFC] Deduplicate the logic between StringMapEntry.first() and StringMapEntry.getKey() Oct 28, 2024
@bricknerb
Copy link
Contributor Author

Sounds good - please add [NFC] to the title

Done.

@dwblaikie dwblaikie merged commit 80f38fb into llvm:main Oct 28, 2024
8 checks passed
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
@bricknerb bricknerb deleted the dedup branch November 6, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants