delete static_cast<SectionMemoryManager*>(object);
}
+namespace {
class MCJITCAPITest : public testing::Test, public MCJITTestAPICommon {
protected:
MCJITCAPITest() {
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);
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;