From 6a6f2dda36f2cff5cc97a2ffe0307da7b330a8b0 Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Fri, 16 May 2008 22:46:40 +0000 Subject: [PATCH] Add CommonLinkage, in a way that preserves the behavior on old .bc files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51210 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/lto2/LTOModule.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/lto2/LTOModule.cpp b/tools/lto2/LTOModule.cpp index cc3b1f142dc..2fd29be272a 100644 --- a/tools/lto2/LTOModule.cpp +++ b/tools/lto2/LTOModule.cpp @@ -203,6 +203,9 @@ void LTOModule::addDefinedSymbol(GlobalValue* def, Mangler &mangler, attr |= LTO_SYMBOL_DEFINITION_TENTATIVE; } } + else if ( def->hasCommonLinkage()) { + attr |= LTO_SYMBOL_DEFINITION_TENTATIVE; + } else { attr |= LTO_SYMBOL_DEFINITION_REGULAR; }