[PATCH] D115631: [Flang][Unit Test] Move the declaration of kindMap to the class
Kiran Chandramohan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 13 08:14:28 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf97731c76501: [Flang][Unit Test] Move the declaration of kindMap to the class (authored by kiranchandramohan).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115631/new/
https://reviews.llvm.org/D115631
Files:
flang/unittests/Optimizer/Builder/CharacterTest.cpp
flang/unittests/Optimizer/Builder/DoLoopHelperTest.cpp
Index: flang/unittests/Optimizer/Builder/DoLoopHelperTest.cpp
===================================================================
--- flang/unittests/Optimizer/Builder/DoLoopHelperTest.cpp
+++ flang/unittests/Optimizer/Builder/DoLoopHelperTest.cpp
@@ -15,9 +15,9 @@
struct DoLoopHelperTest : public testing::Test {
public:
void SetUp() {
- fir::KindMapping kindMap(&context);
+ kindMap = std::make_unique<fir::KindMapping>(&context);
mlir::OpBuilder builder(&context);
- firBuilder = new fir::FirOpBuilder(builder, kindMap);
+ firBuilder = new fir::FirOpBuilder(builder, *kindMap);
fir::support::loadDialects(context);
}
void TearDown() { delete firBuilder; }
@@ -25,6 +25,7 @@
fir::FirOpBuilder &getBuilder() { return *firBuilder; }
mlir::MLIRContext context;
+ std::unique_ptr<fir::KindMapping> kindMap;
fir::FirOpBuilder *firBuilder;
};
Index: flang/unittests/Optimizer/Builder/CharacterTest.cpp
===================================================================
--- flang/unittests/Optimizer/Builder/CharacterTest.cpp
+++ flang/unittests/Optimizer/Builder/CharacterTest.cpp
@@ -16,7 +16,7 @@
struct CharacterTest : public testing::Test {
public:
void SetUp() override {
- fir::KindMapping kindMap(&context,
+ kindMap = std::make_unique<fir::KindMapping>(&context,
"i10:80,l3:24,a1:8,r54:Double,c20:X86_FP80,r11:PPC_FP128,"
"r12:FP128,r13:X86_FP80,r14:Double,r15:Float,r16:Half,r23:BFloat");
mlir::OpBuilder builder(&context);
@@ -32,12 +32,13 @@
builder.setInsertionPointToStart(entryBlock);
fir::support::loadDialects(context);
- firBuilder = std::make_unique<fir::FirOpBuilder>(mod, kindMap);
+ firBuilder = std::make_unique<fir::FirOpBuilder>(mod, *kindMap);
}
fir::FirOpBuilder &getBuilder() { return *firBuilder; }
mlir::MLIRContext context;
+ std::unique_ptr<fir::KindMapping> kindMap;
std::unique_ptr<fir::FirOpBuilder> firBuilder;
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115631.393904.patch
Type: text/x-patch
Size: 1967 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211213/fb1e569c/attachment.bin>
More information about the llvm-commits
mailing list