[llvm] 4ceca8f - [JITLink] Add missing include, explicitly qualify STLExtras functions.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 13:06:30 PDT 2019


Author: Lang Hames
Date: 2019-10-30T13:06:15-07:00
New Revision: 4ceca8fa66504e9b22bfc1510ee5443852d9c0c9

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

LOG: [JITLink] Add missing include, explicitly qualify STLExtras functions.

This should fix the failures on some bots due to commit
b9d8e23b806ca605c368f924cca75bdd090834c6.

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 c3bdfb119501..cb86d09f0234 100644
--- a/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp
+++ b/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp
@@ -6,6 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/ExecutionEngine/JITLink/JITLink.h"
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/Memory.h"
@@ -20,10 +21,10 @@ TEST(LinkGraphTest, Construction) {
   EXPECT_EQ(G.getName(), "foo");
   EXPECT_EQ(G.getPointerSize(), 8U);
   EXPECT_EQ(G.getEndianness(), support::little);
-  EXPECT_TRUE(empty(G.external_symbols()));
-  EXPECT_TRUE(empty(G.absolute_symbols()));
-  EXPECT_TRUE(empty(G.defined_symbols()));
-  EXPECT_TRUE(empty(G.blocks()));
+  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()));
 }
 
 TEST(LinkGraphTest, SplitBlock) {
@@ -98,7 +99,7 @@ TEST(LinkGraphTest, SplitBlock) {
 
   // Check that edges in B1 have been transferred as expected:
   // Both blocks should now have two edges each at offsets 0 and 4.
-  EXPECT_EQ(size(B1.edges()), 2);
+  EXPECT_EQ(llvm::size(B1.edges()), 2);
   if (size(B1.edges()) == 2) {
     auto *E1 = &*B1.edges().begin();
     auto *E2 = &*(B1.edges().begin() + 1);
@@ -108,7 +109,7 @@ TEST(LinkGraphTest, SplitBlock) {
     EXPECT_EQ(E2->getOffset(), 4U);
   }
 
-  EXPECT_EQ(size(B2.edges()), 2);
+  EXPECT_EQ(llvm::size(B2.edges()), 2);
   if (size(B2.edges()) == 2) {
     auto *E1 = &*B2.edges().begin();
     auto *E2 = &*(B2.edges().begin() + 1);


        


More information about the llvm-commits mailing list