diff options
Diffstat (limited to 'unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp')
-rw-r--r-- | unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp b/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp index 15c58c4..46d6d9b 100644 --- a/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp +++ b/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp @@ -59,6 +59,7 @@ static void roundTripDestroy(void *object) { delete static_cast<SectionMemoryManager*>(object); } +namespace { class MCJITCAPITest : public testing::Test, public MCJITTestAPICommon { protected: MCJITCAPITest() { @@ -83,8 +84,14 @@ protected: UnsupportedOSs.push_back(Triple::Cygwin); } - virtual void SetUp(); - + virtual void SetUp() { + didCallAllocateCodeSection = false; + Module = 0; + Function = 0; + Engine = 0; + Error = 0; + } + virtual void TearDown() { if (Engine) LLVMDisposeExecutionEngine(Engine); @@ -150,15 +157,7 @@ protected: LLVMExecutionEngineRef Engine; char *Error; }; - -// Provide out-of-line definition to prevent weak vtable. -void MCJITCAPITest::SetUp() { - didCallAllocateCodeSection = false; - Module = 0; - Function = 0; - Engine = 0; - Error = 0; -} +} // end anonymous namespace TEST_F(MCJITCAPITest, simple_function) { SKIP_UNSUPPORTED_PLATFORM; |