summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/tools/llvm-exegesis/X86/SnippetFileTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/tools/llvm-exegesis/X86/SnippetFileTest.cpp')
-rw-r--r--llvm/unittests/tools/llvm-exegesis/X86/SnippetFileTest.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/llvm/unittests/tools/llvm-exegesis/X86/SnippetFileTest.cpp b/llvm/unittests/tools/llvm-exegesis/X86/SnippetFileTest.cpp
index d4773fc134d..69dd689fc49 100644
--- a/llvm/unittests/tools/llvm-exegesis/X86/SnippetFileTest.cpp
+++ b/llvm/unittests/tools/llvm-exegesis/X86/SnippetFileTest.cpp
@@ -9,6 +9,7 @@
#include "SnippetFile.h"
#include "LlvmState.h"
+#include "TestBase.h"
#include "X86InstrInfo.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
@@ -33,19 +34,8 @@ using testing::Field;
using testing::Property;
using testing::SizeIs;
-class X86SnippetFileTest : public ::testing::Test {
+class X86SnippetFileTest : public X86TestBase {
protected:
- X86SnippetFileTest() : State("x86_64-unknown-linux", "haswell") {}
-
- static void SetUpTestCase() {
- LLVMInitializeX86TargetInfo();
- LLVMInitializeX86TargetMC();
- LLVMInitializeX86Target();
- LLVMInitializeX86AsmPrinter();
- LLVMInitializeX86AsmParser();
- InitializeX86ExegesisTarget();
- }
-
Expected<std::vector<BenchmarkCode>> TestCommon(StringRef Contents) {
SmallString<64> Filename;
std::error_code EC;
@@ -60,8 +50,6 @@ protected:
}
return readSnippets(State, Filename);
}
-
- const LLVMState State;
};
// FIXME: Refactor these to ../Common/Matchers.h
OpenPOWER on IntegriCloud