[docs] Fix build-docs.sh
[llvm-project.git] / llvm / unittests / tools / llvm-exegesis / PowerPC / TestBase.h
blob97b6078b5c3459afa5aaf3b001aaf4d056887294
1 //===-- TestBase.h ----------------------------------------------*- 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 // Test fixture common to all PowerPC tests.
9 //===----------------------------------------------------------------------===//
11 #ifndef LLVM_UNITTESTS_TOOLS_LLVMEXEGESIS_POWERPC_TESTBASE_H
12 #define LLVM_UNITTESTS_TOOLS_LLVMEXEGESIS_POWERPC_TESTBASE_H
14 #include "LlvmState.h"
15 #include "llvm/MC/TargetRegistry.h"
16 #include "llvm/Support/TargetSelect.h"
17 #include "gmock/gmock.h"
18 #include "gtest/gtest.h"
20 namespace llvm {
21 namespace exegesis {
23 void InitializePowerPCExegesisTarget();
25 class PPCTestBase : public ::testing::Test {
26 protected:
27 PPCTestBase()
28 : State(cantFail(
29 LLVMState::Create("powerpc64le-unknown-linux", "ppc64le"))) {}
31 static void SetUpTestCase() {
32 LLVMInitializePowerPCTargetInfo();
33 LLVMInitializePowerPCTargetMC();
34 LLVMInitializePowerPCTarget();
35 InitializePowerPCExegesisTarget();
38 const LLVMState State;
41 } // namespace exegesis
42 } // namespace llvm
44 #endif