summaryrefslogtreecommitdiff
path: root/unittests/ExecutionEngine
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-10-16 16:21:40 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-10-16 16:21:40 +0000
commit670655471dfc35d90271393bd3e6e26a708f1a3c (patch)
tree9f892fa407308503dc2b9d95ac3a8d7687ca8421 /unittests/ExecutionEngine
parenta2cd42a0a7c46d158714c09047a77b7bc1cf9d69 (diff)
downloadllvm-670655471dfc35d90271393bd3e6e26a708f1a3c.tar.gz
llvm-670655471dfc35d90271393bd3e6e26a708f1a3c.tar.bz2
llvm-670655471dfc35d90271393bd3e6e26a708f1a3c.tar.xz
Assert on duplicate registration. Don't depend on function pointer equality.
Before this patch we would assert when building llvm as multiple shared libraries (cmake's BUILD_SHARED_LIBS). The problem was the line if (T.AsmStreamerCtorFn == Target::createDefaultAsmStreamer) which returns false because of -fvisibility-inlines-hidden. It is easy to fix just this one case, but I decided to try to also make the registration more strict. It looks like the old logic for ignoring followup registration was just a temporary hack that outlived its usefulness. This patch converts the ifs to asserts, fixes the few cases that were registering twice and makes sure all the asserts compare with null. Thanks for Joerg for reporting the problem and reviewing the patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ExecutionEngine')
-rw-r--r--unittests/ExecutionEngine/JIT/JITTest.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/unittests/ExecutionEngine/JIT/JITTest.cpp b/unittests/ExecutionEngine/JIT/JITTest.cpp
index 73976ab0f9..4c7b1e2319 100644
--- a/unittests/ExecutionEngine/JIT/JITTest.cpp
+++ b/unittests/ExecutionEngine/JIT/JITTest.cpp
@@ -721,16 +721,4 @@ TEST(LazyLoadedJITTest, EagerCompiledRecursionThroughGhost) {
}
#endif // !defined(__arm__) && !defined(__powerpc__) && !defined(__s390__)
-// This code is copied from JITEventListenerTest, but it only runs once for all
-// the tests in this directory. Everything seems fine, but that's strange
-// behavior.
-class JITEnvironment : public testing::Environment {
- virtual void SetUp() {
- // Required to create a JIT.
- InitializeNativeTarget();
- }
-};
-testing::Environment* const jit_env =
- testing::AddGlobalTestEnvironment(new JITEnvironment);
-
}