llvm-6502/unittests
Rafael Espindola 670655471d 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
2013-10-16 16:21:40 +00:00
..
ADT Add a Python-like join function to merge a list of strings with a 2013-09-03 20:43:54 +00:00
Analysis Fix an oversight in isPotentiallyReachable where we wouldn't do any CFG-walking 2013-08-13 00:03:47 +00:00
Bitcode llvm/unittests: Use OwningPtr to fix --vg-leak. 2013-01-23 08:33:13 +00:00
CodeGen Use ASSERT_EQ rather than ASSERT_TRUE for better unit test failures. 2013-10-15 23:00:17 +00:00
DebugInfo Create a stub for DWARF parser unittests 2013-04-17 08:29:02 +00:00
ExecutionEngine Assert on duplicate registration. Don't depend on function pointer equality. 2013-10-16 16:21:40 +00:00
IR Silencing an MSVC warning. 2013-10-05 19:41:41 +00:00
Object Update incorrect file headers. 2013-08-01 18:42:28 +00:00
Option Option parsing: support case-insensitive option matching. 2013-08-28 20:04:31 +00:00
Support Add non-blocking Wait() for launched processes 2013-10-01 14:28:18 +00:00
Transforms Introduce SpecialCaseList::isIn overload for GlobalAliases. 2013-08-19 19:00:35 +00:00
CMakeLists.txt Add a hashing routine that handles hashing types. Add a test for 2013-09-03 21:57:57 +00:00
Makefile Add a hashing routine that handles hashing types. Add a test for 2013-09-03 21:57:57 +00:00
Makefile.unittest build/unittests: Fix llvm-config names for gtest libraries, and bring Makefile 2011-12-15 23:35:08 +00:00