[llvm-commits] [llvm] r51209 - in /llvm/trunk/tools: llvm-nm/llvm-nm.cpp lto/lto.cpp
Dale Johannesen
dalej at apple.com
Fri May 16 15:44:18 PDT 2008
Author: johannes
Date: Fri May 16 17:44:18 2008
New Revision: 51209
URL: http://llvm.org/viewvc/llvm-project?rev=51209&view=rev
Log:
Add CommonLinkage to lto (treated same as weak AFAICT)
and llvm-nm (prints as C).
Modified:
llvm/trunk/tools/llvm-nm/llvm-nm.cpp
llvm/trunk/tools/lto/lto.cpp
Modified: llvm/trunk/tools/llvm-nm/llvm-nm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-nm/llvm-nm.cpp?rev=51209&r1=51208&r2=51209&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-nm/llvm-nm.cpp (original)
+++ llvm/trunk/tools/llvm-nm/llvm-nm.cpp Fri May 16 17:44:18 2008
@@ -70,6 +70,7 @@
static char TypeCharForSymbol(GlobalValue &GV) {
if (GV.isDeclaration()) return 'U';
if (GV.hasLinkOnceLinkage()) return 'C';
+ if (GV.hasCommonLinkage()) return 'C';
if (GV.hasWeakLinkage()) return 'W';
if (isa<Function>(GV) && GV.hasInternalLinkage()) return 't';
if (isa<Function>(GV)) return 'T';
Modified: llvm/trunk/tools/lto/lto.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/lto.cpp?rev=51209&r1=51208&r2=51209&view=diff
==============================================================================
--- llvm/trunk/tools/lto/lto.cpp (original)
+++ llvm/trunk/tools/lto/lto.cpp Fri May 16 17:44:18 2008
@@ -65,7 +65,7 @@
gv->setLinkage(GlobalValue::InternalLinkage);
}
-// Map LLVM LinkageType to LTO LinakgeType
+// Map LLVM LinkageType to LTO LinkageType
static LTOLinkageTypes
getLTOLinkageType(GlobalValue *v)
{
@@ -76,6 +76,8 @@
lt = LTOLinkOnceLinkage;
else if (v->hasWeakLinkage())
lt = LTOWeakLinkage;
+ else if (v->hasCommonLinkage())
+ lt = LTOCommonLinkage;
else
// Otherwise it is internal linkage for link time optimizer
lt = LTOInternalLinkage;
More information about the llvm-commits
mailing list