summaryrefslogtreecommitdiff
path: root/tools/lto/lto.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-05-16 22:44:18 +0000
committerDale Johannesen <dalej@apple.com>2008-05-16 22:44:18 +0000
commit7d5633e9074db9eaf796e677451f6642c0174fac (patch)
treecd9ead6dbf548fb8124870d663b2acc2340cc7c2 /tools/lto/lto.cpp
parentc9b0aa788f837673cd5c28331dd464909dd72560 (diff)
downloadllvm-7d5633e9074db9eaf796e677451f6642c0174fac.tar.gz
llvm-7d5633e9074db9eaf796e677451f6642c0174fac.tar.bz2
llvm-7d5633e9074db9eaf796e677451f6642c0174fac.tar.xz
Add CommonLinkage to lto (treated same as weak AFAICT)
and llvm-nm (prints as C). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51209 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto/lto.cpp')
-rw-r--r--tools/lto/lto.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/lto/lto.cpp b/tools/lto/lto.cpp
index d2cb3b8b43..0a962fce1d 100644
--- a/tools/lto/lto.cpp
+++ b/tools/lto/lto.cpp
@@ -65,7 +65,7 @@ void LLVMSymbol::mayBeNotUsed() {
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 @@ getLTOLinkageType(GlobalValue *v)
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;