[llvm] 7046b2b - [UnitTests] Remove uses of deprecated CreateLoad() API
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 11 10:06:06 PST 2021
Author: Nikita Popov
Date: 2021-03-11T19:05:53+01:00
New Revision: 7046b2b2958d0139d0d6c5bb65796a08f2ceed77
URL: https://github.com/llvm/llvm-project/commit/7046b2b2958d0139d0d6c5bb65796a08f2ceed77
DIFF: https://github.com/llvm/llvm-project/commit/7046b2b2958d0139d0d6c5bb65796a08f2ceed77.diff
LOG: [UnitTests] Remove uses of deprecated CreateLoad() API
Missed this usage inside OpenMPIRBuilderTest.
Added:
Modified:
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
index 16695b089ad9..344c66c3165b 100644
--- a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+++ b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
@@ -437,7 +437,8 @@ TEST_F(OpenMPIRBuilderTest, ParallelSimple) {
Builder.CreateStore(F->arg_begin(), PrivAI);
Builder.restoreIP(CodeGenIP);
- Value *PrivLoad = Builder.CreateLoad(PrivAI, "local.use");
+ Value *PrivLoad = Builder.CreateLoad(PrivAI->getAllocatedType(), PrivAI,
+ "local.use");
Value *Cmp = Builder.CreateICmpNE(F->arg_begin(), PrivLoad);
Instruction *ThenTerm, *ElseTerm;
SplitBlockAndInsertIfThenElse(Cmp, CodeGenIP.getBlock()->getTerminator(),
@@ -742,7 +743,8 @@ TEST_F(OpenMPIRBuilderTest, ParallelIfCond) {
Builder.CreateStore(F->arg_begin(), PrivAI);
Builder.restoreIP(CodeGenIP);
- Value *PrivLoad = Builder.CreateLoad(PrivAI, "local.use");
+ Value *PrivLoad = Builder.CreateLoad(PrivAI->getAllocatedType(), PrivAI,
+ "local.use");
Value *Cmp = Builder.CreateICmpNE(F->arg_begin(), PrivLoad);
Instruction *ThenTerm, *ElseTerm;
SplitBlockAndInsertIfThenElse(Cmp, CodeGenIP.getBlock()->getTerminator(),
@@ -1742,7 +1744,8 @@ TEST_F(OpenMPIRBuilderTest, MasterDirective) {
EntryBB = ThenBB->getUniquePredecessor();
// simple instructions for body
- Value *PrivLoad = Builder.CreateLoad(PrivAI, "local.use");
+ Value *PrivLoad = Builder.CreateLoad(PrivAI->getAllocatedType(), PrivAI,
+ "local.use");
Builder.CreateICmpNE(F->arg_begin(), PrivLoad);
};
@@ -1812,7 +1815,8 @@ TEST_F(OpenMPIRBuilderTest, CriticalDirective) {
// body begin
Builder.restoreIP(CodeGenIP);
Builder.CreateStore(F->arg_begin(), PrivAI);
- Value *PrivLoad = Builder.CreateLoad(PrivAI, "local.use");
+ Value *PrivLoad = Builder.CreateLoad(PrivAI->getAllocatedType(), PrivAI,
+ "local.use");
Builder.CreateICmpNE(F->arg_begin(), PrivLoad);
};
@@ -1935,7 +1939,8 @@ TEST_F(OpenMPIRBuilderTest, SingleDirective) {
EntryBB = ThenBB->getUniquePredecessor();
// simple instructions for body
- Value *PrivLoad = Builder.CreateLoad(PrivAI, "local.use");
+ Value *PrivLoad = Builder.CreateLoad(PrivAI->getAllocatedType(), PrivAI,
+ "local.use");
Builder.CreateICmpNE(F->arg_begin(), PrivLoad);
};
More information about the llvm-commits
mailing list