[flang-commits] [flang] 7ee332c - [flang] Use x.empty() instead of llvm::empty(x) (NFC)

Kazu Hirata via flang-commits flang-commits at lists.llvm.org
Sun Sep 18 11:10:20 PDT 2022


Author: Kazu Hirata
Date: 2022-09-18T11:10:11-07:00
New Revision: 7ee332c4af41a79041dad1f39df72d8320dcf02d

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

LOG: [flang] 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: 
    flang/unittests/Optimizer/Builder/Runtime/CharacterTest.cpp

Removed: 
    


################################################################################
diff  --git a/flang/unittests/Optimizer/Builder/Runtime/CharacterTest.cpp b/flang/unittests/Optimizer/Builder/Runtime/CharacterTest.cpp
index 3ab30ff380bf8..315f8c80dc33f 100644
--- a/flang/unittests/Optimizer/Builder/Runtime/CharacterTest.cpp
+++ b/flang/unittests/Optimizer/Builder/Runtime/CharacterTest.cpp
@@ -84,7 +84,7 @@ void checkCharCompare2(
   auto cmpOp = mlir::dyn_cast<mlir::arith::CmpIOp>(res.getDefiningOp());
   checkCallOp(cmpOp.getLhs().getDefiningOp(), fctName, 4, /*addLocArgs=*/false);
   auto allocas = res.getParentBlock()->getOps<fir::AllocaOp>();
-  EXPECT_TRUE(llvm::empty(allocas));
+  EXPECT_TRUE(allocas.empty());
 }
 
 TEST_F(RuntimeCallTest, genCharCompare2Test) {


        


More information about the flang-commits mailing list