diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2010-01-26 23:30:46 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-01-26 23:30:46 +0000 |
commit | 9815582faddd8d6a194472e02ce408018d8cacec (patch) | |
tree | 8ea09c43e1e6e940bd43f9ca39a00ce9397ca79c /unittests/ExecutionEngine/JIT/JITTest.cpp | |
parent | 0c81e34a546698723aeb4bcab5c85bd0ba93299a (diff) |
Roll r94484 (avoiding RTTI problems in tests) forward again in a way that isn't
broken by setting CXXFLAGS on the command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94619 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ExecutionEngine/JIT/JITTest.cpp')
-rw-r--r-- | unittests/ExecutionEngine/JIT/JITTest.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/unittests/ExecutionEngine/JIT/JITTest.cpp b/unittests/ExecutionEngine/JIT/JITTest.cpp index bed2d22f1c..7f75afada1 100644 --- a/unittests/ExecutionEngine/JIT/JITTest.cpp +++ b/unittests/ExecutionEngine/JIT/JITTest.cpp @@ -58,7 +58,6 @@ std::string DumpFunction(const Function *F) { return Result; } -#if 0 class RecordingJITMemoryManager : public JITMemoryManager { const OwningPtr<JITMemoryManager> Base; public: @@ -179,7 +178,6 @@ public: return Base->endExceptionTable(F, TableStart, TableEnd, FrameRegister); } }; -#endif bool LoadAssemblyInto(Module *M, const char *assembly) { SMDiagnostic Error; @@ -197,15 +195,11 @@ class JITTest : public testing::Test { virtual void SetUp() { M = new Module("<main>", Context); MP = new ExistingModuleProvider(M); -#if 0 RJMM = new RecordingJITMemoryManager; RJMM->setPoisonMemory(true); -#endif std::string Error; TheJIT.reset(EngineBuilder(MP).setEngineKind(EngineKind::JIT) -#if 0 .setJITMemoryManager(RJMM) -#endif .setErrorStr(&Error).create()); ASSERT_TRUE(TheJIT.get() != NULL) << Error; } @@ -217,9 +211,7 @@ class JITTest : public testing::Test { LLVMContext Context; Module *M; // Owned by MP. ModuleProvider *MP; // Owned by ExecutionEngine. -#if 0 RecordingJITMemoryManager *RJMM; -#endif OwningPtr<ExecutionEngine> TheJIT; }; @@ -438,7 +430,6 @@ TEST_F(JITTest, ModuleDeletion) { TheJIT->getPointerToFunction(func); TheJIT->deleteModuleProvider(MP); -#if 0 SmallPtrSet<const void*, 2> FunctionsDeallocated; for (unsigned i = 0, e = RJMM->deallocateFunctionBodyCalls.size(); i != e; ++i) { @@ -472,7 +463,6 @@ TEST_F(JITTest, ModuleDeletion) { } EXPECT_EQ(RJMM->startExceptionTableCalls.size(), NumTablesDeallocated); -#endif } // ARM and PPC still emit stubs for calls since the target may be too far away @@ -507,18 +497,14 @@ TEST_F(JITTest, NoStubs) { // We should now allocate no more stubs, we have the code to foo // and the existing stub for bar. -#if 0 int stubsBefore = RJMM->stubsAllocated; -#endif Function *func = M->getFunction("main"); TheJIT->getPointerToFunction(func); Function *bar = M->getFunction("bar"); TheJIT->getPointerToFunction(bar); -#if 0 ASSERT_EQ(stubsBefore, RJMM->stubsAllocated); -#endif } #endif // !ARM && !PPC |