summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/JIT/MultiJITTest.cpp
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2013-05-06 16:10:35 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2013-05-06 16:10:35 +0000
commitf1c3004528780fb4030a1a5aa0b6b6abb872b39c (patch)
treee48d82452e8a9dc943efcb2e24bff047a72aef37 /llvm/unittests/ExecutionEngine/JIT/MultiJITTest.cpp
parentcf8ea44a8383e3e39525b709cae56d0319c8462a (diff)
downloadbcm5719-llvm-f1c3004528780fb4030a1a5aa0b6b6abb872b39c.tar.gz
bcm5719-llvm-f1c3004528780fb4030a1a5aa0b6b6abb872b39c.zip
Simplify JIT unit test #ifdefs
Several platforms need to disable all old-JIT unit tests, since they only support the new MCJIT. This currently done via #ifdef'ing out those tests in the ExecutionEngine/JIT/*.cpp files. As those #ifdef's have grown historically, we now have a number of repeated directives which -in total- cover nearly the whole file, but leave a couple of helper functions out. When building the tests with clang itself, those helper functions now cause spurious "unused function" warnings. To fix those warnings, and also to remove the duplicate #ifdef conditions and make it easier to disable the tests for a new target, this patch consolidates the #ifdefs into a single one per file, which covers all the tests including all helper routines. Tested on PowerPC and SystemZ. llvm-svn: 181200
Diffstat (limited to 'llvm/unittests/ExecutionEngine/JIT/MultiJITTest.cpp')
-rw-r--r--llvm/unittests/ExecutionEngine/JIT/MultiJITTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/unittests/ExecutionEngine/JIT/MultiJITTest.cpp b/llvm/unittests/ExecutionEngine/JIT/MultiJITTest.cpp
index 53014672c26..b3e992639db 100644
--- a/llvm/unittests/ExecutionEngine/JIT/MultiJITTest.cpp
+++ b/llvm/unittests/ExecutionEngine/JIT/MultiJITTest.cpp
@@ -20,6 +20,9 @@ using namespace llvm;
namespace {
+// ARM and PowerPC tests disabled pending fix for PR10783.
+#if !defined(__arm__) && !defined(__powerpc__)
+
bool LoadAssemblyInto(Module *M, const char *assembly) {
SMDiagnostic Error;
bool success =
@@ -65,9 +68,6 @@ void createModule2(LLVMContext &Context2, Module *&M2, Function *&FooF2) {
FooF2 = M2->getFunction("foo2");
}
-// ARM and PowerPC tests disabled pending fix for PR10783.
-#if !defined(__arm__) && !defined(__powerpc__)
-
TEST(MultiJitTest, EagerMode) {
LLVMContext Context1;
Module *M1 = 0;
OpenPOWER on IntegriCloud