llvm-6502/lib/Target/NVPTX
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
..
InstPrinter
MCTargetDesc
TargetInfo
cl_common_defines.h
CMakeLists.txt
LLVMBuild.txt
Makefile
ManagedStringPool.h
NVPTX.h
NVPTX.td
NVPTXAllocaHoisting.cpp
NVPTXAllocaHoisting.h
NVPTXAsmPrinter.cpp
NVPTXAsmPrinter.h
NVPTXFrameLowering.cpp
NVPTXFrameLowering.h
NVPTXGenericToNVVM.cpp
NVPTXInstrFormats.td
NVPTXInstrInfo.cpp
NVPTXInstrInfo.h
NVPTXInstrInfo.td
NVPTXIntrinsics.td
NVPTXISelDAGToDAG.cpp
NVPTXISelDAGToDAG.h
NVPTXISelLowering.cpp
NVPTXISelLowering.h
NVPTXLowerAggrCopies.cpp
NVPTXLowerAggrCopies.h
NVPTXMCExpr.cpp
NVPTXMCExpr.h
NVPTXPrologEpilogPass.cpp
NVPTXRegisterInfo.cpp
NVPTXRegisterInfo.h
NVPTXRegisterInfo.td
NVPTXSection.h
NVPTXSplitBBatBar.cpp
NVPTXSplitBBatBar.h
NVPTXSubtarget.cpp
NVPTXSubtarget.h
NVPTXTargetMachine.cpp Assert on duplicate registration. Don't depend on function pointer equality. 2013-10-16 16:21:40 +00:00
NVPTXTargetMachine.h
NVPTXTargetObjectFile.h
NVPTXutil.cpp
NVPTXutil.h
NVPTXUtilities.cpp
NVPTXUtilities.h
NVPTXVector.td
NVVMReflect.cpp