| 1 | //===- LLVMTestBase.h - Test fixure for LLVM dialect tests ------*- C++ -*-===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // Test fixure for LLVM dialect tests. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | #ifndef MLIR_UNITTEST_DIALECT_LLVMIR_LLVMTESTBASE_H |
| 14 | #define MLIR_UNITTEST_DIALECT_LLVMIR_LLVMTESTBASE_H |
| 15 | |
| 16 | #include "mlir/Dialect/LLVMIR/LLVMDialect.h" |
| 17 | #include "mlir/IR/MLIRContext.h" |
| 18 | #include "gtest/gtest.h" |
| 19 | |
| 20 | class LLVMIRTest : public ::testing::Test { |
| 21 | protected: |
| 22 | LLVMIRTest() { context.getOrLoadDialect<mlir::LLVM::LLVMDialect>(); } |
| 23 | |
| 24 | mlir::MLIRContext context; |
| 25 | }; |
| 26 | |
| 27 | #endif |
| 28 | |