[llvm-commits] [llvm] r94484 - 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 15:27:19 PST 2010
Yes, that works.
On Jan 26, 2010, at 3:11 PM, Jeffrey Yasskin wrote:
> Sorry for the trouble. Could you test this patch?
>
> On Tue, Jan 26, 2010 at 11:03 AM, Bob Wilson <bob.wilson at apple.com> wrote:
>> This breaks the build on Darwin. There are lots of messages like:
>>
>> In file included from /usr/include/c++/4.2.1/tr1/tuple:159,
>> from /Users/bwilson/local/nightly/build/llvmCore.roots/llvmCore~obj/src/utils/unittest/googletest/include/gtest/internal/gtest-port.h:329,
>> from /Users/bwilson/local/nightly/build/llvmCore.roots/llvmCore~obj/src/utils/unittest/googletest/include/gtest/internal/gtest-internal.h:40,
>> from /Users/bwilson/local/nightly/build/llvmCore.roots/llvmCore~obj/src/utils/unittest/googletest/include/gtest/gtest.h:65,
>> from /Users/bwilson/local/nightly/build/llvmCore.roots/llvmCore~obj/src/unittests/Support/AllocatorTest.cpp:12:
>> /usr/include/c++/4.2.1/tr1/functional: In static member function 'static bool std::tr1::_Function_base::_Base_manager<_Functor>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)':
>> /usr/include/c++/4.2.1/tr1/functional:907: error: cannot use typeid with -fno-rtti
>>
>> In file included from /usr/include/c++/4.2.1/tr1/repeat.h:74,
>> from /usr/include/c++/4.2.1/tr1/functional:1098,
>> from /usr/include/c++/4.2.1/tr1/tuple:159,
>> from /Users/bwilson/local/nightly/build/llvmCore.roots/llvmCore~obj/src/utils/unittest/googletest/include/gtest/internal/gtest-port.h:329,
>> from /Users/bwilson/local/nightly/build/llvmCore.roots/llvmCore~obj/src/utils/unittest/googletest/include/gtest/internal/gtest-internal.h:40,
>> from /Users/bwilson/local/nightly/build/llvmCore.roots/llvmCore~obj/src/utils/unittest/googletest/include/gtest/gtest.h:65,
>> from /Users/bwilson/local/nightly/build/llvmCore.roots/llvmCore~obj/src/unittests/Support/AllocatorTest.cpp:12:
>> /usr/include/c++/4.2.1/tr1/functional_iterate.h: In static member function 'static bool std::tr1::_Function_handler<void ()(), _Member _Class::*>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)':
>> /usr/include/c++/4.2.1/tr1/functional_iterate.h:572: error: cannot use typeid with -fno-rtti
>>
>> (just to pick 2 samples at random).
>>
>> I'm reverting this for now. I'd be glad to test a revised patch for you in case you don't have convenient access to a Mac.
>>
>> On Jan 25, 2010, at 5:26 PM, Jeffrey Yasskin wrote:
>>
>>> Author: jyasskin
>>> Date: Mon Jan 25 19:26:46 2010
>>> New Revision: 94484
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=94484&view=rev
>>> Log:
>>> Re-enable unit tests disabled in r94164 by telling GTest about the
>>> lack of 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=94484&r1=94483&r2=94484&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp (original)
>>> +++ llvm/trunk/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp Mon Jan 25 19:26:46 2010
>>> @@ -25,7 +25,6 @@
>>>
>>> int dummy;
>>>
>>> -#if 0
>>> namespace {
>>>
>>> struct FunctionEmittedEvent {
>>> @@ -238,4 +237,3 @@
>>> 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=94484&r1=94483&r2=94484&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp (original)
>>> +++ llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp Mon Jan 25 19:26:46 2010
>>> @@ -58,7 +58,6 @@
>>> return Result;
>>> }
>>>
>>> -#if 0
>>> class RecordingJITMemoryManager : public JITMemoryManager {
>>> const OwningPtr<JITMemoryManager> Base;
>>> public:
>>> @@ -179,7 +178,6 @@
>>> return Base->endExceptionTable(F, TableStart, TableEnd, FrameRegister);
>>> }
>>> };
>>> -#endif
>>>
>>> bool LoadAssemblyInto(Module *M, const char *assembly) {
>>> SMDiagnostic Error;
>>> @@ -197,15 +195,11 @@
>>> 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 @@
>>> LLVMContext Context;
>>> Module *M; // Owned by MP.
>>> ModuleProvider *MP; // Owned by ExecutionEngine.
>>> -#if 0
>>> RecordingJITMemoryManager *RJMM;
>>> -#endif
>>> OwningPtr<ExecutionEngine> TheJIT;
>>> };
>>>
>>> @@ -438,7 +430,6 @@
>>> 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 @@
>>> }
>>> 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 @@
>>>
>>> // 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=94484&r1=94483&r2=94484&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/unittests/Makefile.unittest (original)
>>> +++ llvm/trunk/unittests/Makefile.unittest Mon Jan 25 19:26:46 2010
>>> @@ -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
>>>
>>>
>>> Modified: llvm/trunk/unittests/VMCore/PassManagerTest.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/VMCore/PassManagerTest.cpp?rev=94484&r1=94483&r2=94484&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/unittests/VMCore/PassManagerTest.cpp (original)
>>> +++ llvm/trunk/unittests/VMCore/PassManagerTest.cpp Mon Jan 25 19:26:46 2010
>>> @@ -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 @@
>>>
>>> }
>>> }
>>> -#endif
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
> <reenable-tests.patch>
More information about the llvm-commits
mailing list