aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ProfileData/MemProfTest.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2024-12-11 09:16:44 -0800
committerGitHub <noreply@github.com>2024-12-11 09:16:44 -0800
commit9b94869942bb71daeb119e7701d806ae0003cc0d (patch)
treed069fce284ad595bd071bb48b588ebbbccb3ea06 /llvm/unittests/ProfileData/MemProfTest.cpp
parent92bf1aa399a00c6902e80090074fff66fc5416a9 (diff)
downloadllvm-9b94869942bb71daeb119e7701d806ae0003cc0d.zip
llvm-9b94869942bb71daeb119e7701d806ae0003cc0d.tar.gz
llvm-9b94869942bb71daeb119e7701d806ae0003cc0d.tar.bz2
[memprof] Use front instead of begin in a unit test (NFC) (#119501)
"front" allows us to drop a dereference.
Diffstat (limited to 'llvm/unittests/ProfileData/MemProfTest.cpp')
-rw-r--r--llvm/unittests/ProfileData/MemProfTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/ProfileData/MemProfTest.cpp b/llvm/unittests/ProfileData/MemProfTest.cpp
index 5886d3e..c1b8f24 100644
--- a/llvm/unittests/ProfileData/MemProfTest.cpp
+++ b/llvm/unittests/ProfileData/MemProfTest.cpp
@@ -748,7 +748,7 @@ HeapProfileRecords:
// 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));