mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-15 09:33:39 +00:00
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
This commit is contained in:
parent
c9b0aa788f
commit
7d5633e907
@ -70,6 +70,7 @@ namespace {
|
|||||||
static char TypeCharForSymbol(GlobalValue &GV) {
|
static char TypeCharForSymbol(GlobalValue &GV) {
|
||||||
if (GV.isDeclaration()) return 'U';
|
if (GV.isDeclaration()) return 'U';
|
||||||
if (GV.hasLinkOnceLinkage()) return 'C';
|
if (GV.hasLinkOnceLinkage()) return 'C';
|
||||||
|
if (GV.hasCommonLinkage()) return 'C';
|
||||||
if (GV.hasWeakLinkage()) return 'W';
|
if (GV.hasWeakLinkage()) return 'W';
|
||||||
if (isa<Function>(GV) && GV.hasInternalLinkage()) return 't';
|
if (isa<Function>(GV) && GV.hasInternalLinkage()) return 't';
|
||||||
if (isa<Function>(GV)) return 'T';
|
if (isa<Function>(GV)) return 'T';
|
||||||
|
@ -65,7 +65,7 @@ void LLVMSymbol::mayBeNotUsed() {
|
|||||||
gv->setLinkage(GlobalValue::InternalLinkage);
|
gv->setLinkage(GlobalValue::InternalLinkage);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Map LLVM LinkageType to LTO LinakgeType
|
// Map LLVM LinkageType to LTO LinkageType
|
||||||
static LTOLinkageTypes
|
static LTOLinkageTypes
|
||||||
getLTOLinkageType(GlobalValue *v)
|
getLTOLinkageType(GlobalValue *v)
|
||||||
{
|
{
|
||||||
@ -76,6 +76,8 @@ getLTOLinkageType(GlobalValue *v)
|
|||||||
lt = LTOLinkOnceLinkage;
|
lt = LTOLinkOnceLinkage;
|
||||||
else if (v->hasWeakLinkage())
|
else if (v->hasWeakLinkage())
|
||||||
lt = LTOWeakLinkage;
|
lt = LTOWeakLinkage;
|
||||||
|
else if (v->hasCommonLinkage())
|
||||||
|
lt = LTOCommonLinkage;
|
||||||
else
|
else
|
||||||
// Otherwise it is internal linkage for link time optimizer
|
// Otherwise it is internal linkage for link time optimizer
|
||||||
lt = LTOInternalLinkage;
|
lt = LTOInternalLinkage;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user