summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp2
-rw-r--r--unittests/ExecutionEngine/JIT/JITTest.cpp14
-rw-r--r--unittests/Makefile.unittest6
-rw-r--r--unittests/VMCore/PassManagerTest.cpp5
4 files changed, 5 insertions, 22 deletions
diff --git a/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp b/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
index a58a0872a4e..c3bb8589758 100644
--- a/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
+++ b/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
@@ -25,7 +25,6 @@ using namespace llvm;
int dummy;
-#if 0
namespace {
struct FunctionEmittedEvent {
@@ -238,4 +237,3 @@ 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 bed2d22f1cf..7f75afada1a 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
diff --git a/unittests/Makefile.unittest b/unittests/Makefile.unittest
index 656f5e2f412..65638b2a4f6 100644
--- a/unittests/Makefile.unittest
+++ b/unittests/Makefile.unittest
@@ -14,7 +14,11 @@
# Set up variables for building a unit test.
ifdef TESTNAME
-REQUIRES_RTTI = 1
+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
include $(LEVEL)/Makefile.common
diff --git a/unittests/VMCore/PassManagerTest.cpp b/unittests/VMCore/PassManagerTest.cpp
index 092ce3d928b..cb8f9ebb939 100644
--- a/unittests/VMCore/PassManagerTest.cpp
+++ b/unittests/VMCore/PassManagerTest.cpp
@@ -32,10 +32,6 @@
#include "llvm/Assembly/PrintModulePass.h"
#include "gtest/gtest.h"
-int dummy;
-
-#if 0
-
namespace llvm {
namespace {
// ND = no deps
@@ -529,4 +525,3 @@ namespace llvm {
}
}
-#endif