[llvm-commits] [llvm] r94569 - in /llvm/trunk/unittests: ExecutionEngine/JIT/JITEventListenerTest.cpp ExecutionEngine/JIT/JITTest.cpp Makefile.unittest VMCore/PassManagerTest.cpp

Bob Wilson bob.wilson at apple.com
Tue Jan 26 11:04:37 PST 2010


Author: bwilson
Date: Tue Jan 26 13:04:37 2010
New Revision: 94569

URL: http://llvm.org/viewvc/llvm-project?rev=94569&view=rev
Log:
Revert 94484.  Re-disable unittests that need RTTI.

Modified:
    llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
    llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp
    llvm/trunk/unittests/Makefile.unittest
    llvm/trunk/unittests/VMCore/PassManagerTest.cpp

Modified: llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp?rev=94569&r1=94568&r2=94569&view=diff

==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp Tue Jan 26 13:04:37 2010
@@ -25,6 +25,7 @@
 
 int dummy;
 
+#if 0
 namespace {
 
 struct FunctionEmittedEvent {
@@ -237,3 +238,4 @@
   testing::AddGlobalTestEnvironment(new JITEnvironment);
 
 }  // anonymous namespace
+#endif

Modified: llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp?rev=94569&r1=94568&r2=94569&view=diff

==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp Tue Jan 26 13:04:37 2010
@@ -58,6 +58,7 @@
   return Result;
 }
 
+#if 0
 class RecordingJITMemoryManager : public JITMemoryManager {
   const OwningPtr<JITMemoryManager> Base;
 public:
@@ -178,6 +179,7 @@
     return Base->endExceptionTable(F, TableStart, TableEnd, FrameRegister);
   }
 };
+#endif
 
 bool LoadAssemblyInto(Module *M, const char *assembly) {
   SMDiagnostic Error;
@@ -195,11 +197,15 @@
   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 @@
   LLVMContext Context;
   Module *M;  // Owned by MP.
   ModuleProvider *MP;  // Owned by ExecutionEngine.
+#if 0
   RecordingJITMemoryManager *RJMM;
+#endif
   OwningPtr<ExecutionEngine> TheJIT;
 };
 
@@ -430,6 +438,7 @@
   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 @@
   }
   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 @@
 
   // 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
 

Modified: llvm/trunk/unittests/Makefile.unittest
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Makefile.unittest?rev=94569&r1=94568&r2=94569&view=diff

==============================================================================
--- llvm/trunk/unittests/Makefile.unittest (original)
+++ llvm/trunk/unittests/Makefile.unittest Tue Jan 26 13:04:37 2010
@@ -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
 

Modified: llvm/trunk/unittests/VMCore/PassManagerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/VMCore/PassManagerTest.cpp?rev=94569&r1=94568&r2=94569&view=diff

==============================================================================
--- llvm/trunk/unittests/VMCore/PassManagerTest.cpp (original)
+++ llvm/trunk/unittests/VMCore/PassManagerTest.cpp Tue Jan 26 13:04:37 2010
@@ -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 @@
 
   }
 }
+#endif





More information about the llvm-commits mailing list