Now that templates instantiations are no longer emitted for all modules that

even blink at them they seem to break due to being linkonce (if compiled with
any optimization level > 0), so let's give them weak linkage instead.
The difference is that unreferenced linkonce symbols can be deleted, while
weak symbols need to be preserved.
This commit is contained in:
Frits van Bommel
2009-05-21 15:23:28 +02:00
parent f675d36cfb
commit a520661667

View File

@@ -3,11 +3,11 @@
// Make it easier to test new linkage types
# define TEMPLATE_LINKAGE_TYPE llvm::GlobalValue::LinkOnceODRLinkage
# define TEMPLATE_LINKAGE_TYPE llvm::GlobalValue::WeakODRLinkage
# define TYPEINFO_LINKAGE_TYPE llvm::GlobalValue::LinkOnceODRLinkage
// The One-Definition-Rule shouldn't matter for debug info, right?
# define DEBUGINFO_LINKONCE_LINKAGE_TYPE \
llvm::GlobalValue::LinkOnceAnyLinkage
llvm::GlobalValue::WeakAnyLinkage
#endif