Mercurial > projects > ldc
changeset 1404:11b122f92136
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.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Thu, 21 May 2009 15:23:28 +0200 |
parents | e5c5d354c649 |
children | a865b81fc961 |
files | gen/linkage.h |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/linkage.h Thu May 21 10:56:04 2009 +0200 +++ b/gen/linkage.h Thu May 21 15:23:28 2009 +0200 @@ -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