From 2d83014c469153b4e79bb85d110b026d9f3c5664 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Wed, 19 Aug 2020 17:19:49 +0000 Subject: [PATCH] Fix flang test after MLIR API changes --- flang/unittests/Lower/OpenMPLoweringTest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flang/unittests/Lower/OpenMPLoweringTest.cpp b/flang/unittests/Lower/OpenMPLoweringTest.cpp index ad6fe73..dc002ce 100644 --- a/flang/unittests/Lower/OpenMPLoweringTest.cpp +++ b/flang/unittests/Lower/OpenMPLoweringTest.cpp @@ -9,14 +9,15 @@ #include "gtest/gtest.h" #include "mlir/Dialect/OpenMP/OpenMPDialect.h" #include "mlir/IR/Builders.h" +#include "mlir/InitAllDialects.h" #include "flang/Parser/parse-tree.h" #include "llvm/Frontend/OpenMP/OMPConstants.h" class OpenMPLoweringTest : public testing::Test { protected: void SetUp() override { - mlir::registerDialect(); - mlir::registerAllDialects(&ctx); + ctx.loadDialect(); + mlir::registerAllDialects(ctx.getDialectRegistry()); mlirOpBuilder.reset(new mlir::OpBuilder(&ctx)); } -- 2.7.4