Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

"front" allows us to drop a dereference.

"front" allows us to drop a dereference.
@llvmbot llvmbot added the PGO Profile Guided Optimizations label Dec 11, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 11, 2024

@llvm/pr-subscribers-pgo

Author: Kazu Hirata (kazutakahirata)

Changes

"front" allows us to drop a dereference.


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

1 Files Affected:

  • (modified) llvm/unittests/ProfileData/MemProfTest.cpp (+1-1)
diff --git a/llvm/unittests/ProfileData/MemProfTest.cpp b/llvm/unittests/ProfileData/MemProfTest.cpp
index 093b3a26b5f872..e121bae8b4481b 100644
--- a/llvm/unittests/ProfileData/MemProfTest.cpp
+++ b/llvm/unittests/ProfileData/MemProfTest.cpp
@@ -747,7 +747,7 @@ TEST(MemProf, YAMLParser) {
 
   // Verify the entire contents of MemProfData.Records.
   ASSERT_THAT(MemProfData.Records, SizeIs(1));
-  const auto &[GUID, Record] = *MemProfData.Records.begin();
+  const auto &[GUID, Record] = MemProfData.Records.front();
   EXPECT_EQ(GUID, 0xdeadbeef12345678ULL);
   ASSERT_THAT(Record.AllocSites, SizeIs(2));
   EXPECT_EQ(Record.AllocSites[0].CSId, hashCallStack(CS1));

@kazutakahirata kazutakahirata merged commit 9b94869 into llvm:main Dec 11, 2024
10 checks passed
@kazutakahirata kazutakahirata deleted the memprof_cleanup_front branch December 11, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PGO Profile Guided Optimizations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants