[llvm] a2842a4 - [llvm] Use x.empty() instead of llvm::empty(x) (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 18 11:21:25 PDT 2022


Author: Kazu Hirata
Date: 2022-09-18T11:21:16-07:00
New Revision: a2842a43a15e88e63a5c3d5a74493e6159415980

URL: https://github.com/llvm/llvm-project/commit/a2842a43a15e88e63a5c3d5a74493e6159415980
DIFF: https://github.com/llvm/llvm-project/commit/a2842a43a15e88e63a5c3d5a74493e6159415980.diff

LOG: [llvm] Use x.empty() instead of llvm::empty(x) (NFC)

I'm planning to deprecate and eventually remove llvm::empty.

Note that no use of llvm::empty requires the ability of llvm::empty to
determine the emptiness from begin/end only.

Added: 
    

Modified: 
    llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp b/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp
index 717c673b7e18e..9e54c7745e4dd 100644
--- a/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp
+++ b/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp
@@ -64,10 +64,10 @@ TEST(LinkGraphTest, Construction) {
   EXPECT_EQ(G.getTargetTriple().str(), "x86_64-apple-darwin");
   EXPECT_EQ(G.getPointerSize(), 8U);
   EXPECT_EQ(G.getEndianness(), support::little);
-  EXPECT_TRUE(llvm::empty(G.external_symbols()));
-  EXPECT_TRUE(llvm::empty(G.absolute_symbols()));
-  EXPECT_TRUE(llvm::empty(G.defined_symbols()));
-  EXPECT_TRUE(llvm::empty(G.blocks()));
+  EXPECT_TRUE(G.external_symbols().empty());
+  EXPECT_TRUE(G.absolute_symbols().empty());
+  EXPECT_TRUE(G.defined_symbols().empty());
+  EXPECT_TRUE(G.blocks().empty());
 }
 
 TEST(LinkGraphTest, AddressAccess) {


        


More information about the llvm-commits mailing list