llvm.org GIT mirror llvm / 7d5633e
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 Dale Johannesen 11 years ago
2 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
6969 static char TypeCharForSymbol(GlobalValue &GV) {
7070 if (GV.isDeclaration()) return 'U';
7171 if (GV.hasLinkOnceLinkage()) return 'C';
72 if (GV.hasCommonLinkage()) return 'C';
7273 if (GV.hasWeakLinkage()) return 'W';
7374 if (isa(GV) && GV.hasInternalLinkage()) return 't';
7475 if (isa(GV)) return 'T';
6464 gv->setLinkage(GlobalValue::InternalLinkage);
6565 }
6666
67 // Map LLVM LinkageType to LTO LinakgeType
67 // Map LLVM LinkageType to LTO LinkageType
6868 static LTOLinkageTypes
6969 getLTOLinkageType(GlobalValue *v)
7070 {
7575 lt = LTOLinkOnceLinkage;
7676 else if (v->hasWeakLinkage())
7777 lt = LTOWeakLinkage;
78 else if (v->hasCommonLinkage())
79 lt = LTOCommonLinkage;
7880 else
7981 // Otherwise it is internal linkage for link time optimizer
8082 lt = LTOInternalLinkage;