diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-01-26 19:04:37 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-01-26 19:04:37 +0000 |
commit | 9e4bd03525fc8a281d03a8bf54c32a14a488787c (patch) | |
tree | 0a4e54fac18dead3dc51cfa043001d99def6e3b3 /unittests | |
parent | 298f42dce36011941e8d49430c6977926ab026c5 (diff) | |
download | external_llvm-9e4bd03525fc8a281d03a8bf54c32a14a488787c.zip external_llvm-9e4bd03525fc8a281d03a8bf54c32a14a488787c.tar.gz external_llvm-9e4bd03525fc8a281d03a8bf54c32a14a488787c.tar.bz2 |
Revert 94484. Re-disable unittests that need RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94569 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp | 2 | ||||
-rw-r--r-- | unittests/ExecutionEngine/JIT/JITTest.cpp | 14 | ||||
-rw-r--r-- | unittests/Makefile.unittest | 6 | ||||
-rw-r--r-- | unittests/VMCore/PassManagerTest.cpp | 5 |
4 files changed, 22 insertions, 5 deletions
diff --git a/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp b/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp index c3bb858..a58a087 100644 --- a/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp +++ b/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp @@ -25,6 +25,7 @@ using namespace llvm; int dummy; +#if 0 namespace { struct FunctionEmittedEvent { @@ -237,3 +238,4 @@ testing::Environment* const jit_env = testing::AddGlobalTestEnvironment(new JITEnvironment); } // anonymous namespace +#endif diff --git a/unittests/ExecutionEngine/JIT/JITTest.cpp b/unittests/ExecutionEngine/JIT/JITTest.cpp index 7f75afa..bed2d22 100644 --- a/unittests/ExecutionEngine/JIT/JITTest.cpp +++ b/unittests/ExecutionEngine/JIT/JITTest.cpp @@ -58,6 +58,7 @@ std::string DumpFunction(const Function *F) { return Result; } +#if 0 class RecordingJITMemoryManager : public JITMemoryManager { const OwningPtr<JITMemoryManager> Base; public: @@ -178,6 +179,7 @@ public: return Base->endExceptionTable(F, TableStart, TableEnd, FrameRegister); } }; +#endif bool LoadAssemblyInto(Module *M, const char *assembly) { SMDiagnostic Error; @@ -195,11 +197,15 @@ 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; } @@ -211,7 +217,9 @@ 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; }; @@ -430,6 +438,7 @@ 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) { @@ -463,6 +472,7 @@ 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 @@ -497,14 +507,18 @@ 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 diff --git a/unittests/Makefile.unittest b/unittests/Makefile.unittest index 65638b2..656f5e2 100644 --- a/unittests/Makefile.unittest +++ b/unittests/Makefile.unittest @@ -14,11 +14,7 @@ # Set up variables for building a unit test. ifdef TESTNAME -CXXFLAGS += -DGTEST_HAS_RTTI=0 -# gcc's TR1 <tuple> header depends on RTTI, so force googletest to use -# its own tuple implementation. When we import googletest >=1.4.0, we -# can drop this line. -CXXFLAGS += -DGTEST_HAS_TR1_TUPLE=0 +REQUIRES_RTTI = 1 include $(LEVEL)/Makefile.common diff --git a/unittests/VMCore/PassManagerTest.cpp b/unittests/VMCore/PassManagerTest.cpp index cb8f9eb..092ce3d 100644 --- a/unittests/VMCore/PassManagerTest.cpp +++ b/unittests/VMCore/PassManagerTest.cpp @@ -32,6 +32,10 @@ #include "llvm/Assembly/PrintModulePass.h" #include "gtest/gtest.h" +int dummy; + +#if 0 + namespace llvm { namespace { // ND = no deps @@ -525,3 +529,4 @@ namespace llvm { } } +#endif |