aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp')
-rw-r--r--unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp b/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
index e4197dd..15c58c4 100644
--- a/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
+++ b/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
@@ -83,14 +83,8 @@ protected:
UnsupportedOSs.push_back(Triple::Cygwin);
}
- virtual void SetUp() {
- didCallAllocateCodeSection = false;
- Module = 0;
- Function = 0;
- Engine = 0;
- Error = 0;
- }
-
+ virtual void SetUp();
+
virtual void TearDown() {
if (Engine)
LLVMDisposeExecutionEngine(Engine);
@@ -157,6 +151,15 @@ protected:
char *Error;
};
+// Provide out-of-line definition to prevent weak vtable.
+void MCJITCAPITest::SetUp() {
+ didCallAllocateCodeSection = false;
+ Module = 0;
+ Function = 0;
+ Engine = 0;
+ Error = 0;
+}
+
TEST_F(MCJITCAPITest, simple_function) {
SKIP_UNSUPPORTED_PLATFORM;