[llvm] [memprof] Use testing::IsEmpty (NFC) (PR #144096)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 13 08:36:15 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/144096
This patch replaces testing::IsEmpty with IsEmpty because we already
have:
using ::testing::IsEmpty;
near the beginning of the file.
>From 0953dc602676131518fea06f913f2794c6c72f19 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Thu, 12 Jun 2025 19:02:55 -0700
Subject: [PATCH] [memprof] Use testing::IsEmpty (NFC)
This patch replaces testing::IsEmpty with IsEmpty because we already
have:
using ::testing::IsEmpty;
near the beginning of the file.
---
.../ProfileData/DataAccessProfTest.cpp | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/llvm/unittests/ProfileData/DataAccessProfTest.cpp b/llvm/unittests/ProfileData/DataAccessProfTest.cpp
index 13af3390557d7..2f93e16f28c1c 100644
--- a/llvm/unittests/ProfileData/DataAccessProfTest.cpp
+++ b/llvm/unittests/ProfileData/DataAccessProfTest.cpp
@@ -92,10 +92,10 @@ TEST(MemProf, DataAccessProfile) {
EXPECT_THAT(
Data.getProfileRecord("foo.llvm.123"),
- ValueIs(AllOf(
- Field(&DataAccessProfRecord::SymHandle,
- testing::VariantWith<std::string>(testing::Eq("foo"))),
- Field(&DataAccessProfRecord::Locations, testing::IsEmpty()))));
+ ValueIs(
+ AllOf(Field(&DataAccessProfRecord::SymHandle,
+ testing::VariantWith<std::string>(testing::Eq("foo"))),
+ Field(&DataAccessProfRecord::Locations, IsEmpty()))));
EXPECT_THAT(
Data.getProfileRecord("bar.__uniq.321"),
ValueIs(AllOf(
@@ -130,7 +130,7 @@ TEST(MemProf, DataAccessProfile) {
reinterpret_cast<const unsigned char *>(serializedData.data());
ASSERT_THAT(llvm::to_vector(llvm::make_first_range(
deserializedData.getStrToIndexMapRef())),
- testing::IsEmpty());
+ IsEmpty());
EXPECT_FALSE(deserializedData.deserialize(p));
EXPECT_THAT(
@@ -153,11 +153,10 @@ TEST(MemProf, DataAccessProfile) {
EXPECT_THAT(
Records,
ElementsAre(
- AllOf(
- Field(&DataAccessProfRecordRef::SymbolID, 0),
- Field(&DataAccessProfRecordRef::AccessCount, 100),
- Field(&DataAccessProfRecordRef::IsStringLiteral, false),
- Field(&DataAccessProfRecordRef::Locations, testing::IsEmpty())),
+ AllOf(Field(&DataAccessProfRecordRef::SymbolID, 0),
+ Field(&DataAccessProfRecordRef::AccessCount, 100),
+ Field(&DataAccessProfRecordRef::IsStringLiteral, false),
+ Field(&DataAccessProfRecordRef::Locations, IsEmpty())),
AllOf(Field(&DataAccessProfRecordRef::SymbolID, 2),
Field(&DataAccessProfRecordRef::AccessCount, 123),
Field(&DataAccessProfRecordRef::IsStringLiteral, false),
More information about the llvm-commits
mailing list