mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Make error messages to have common style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48180 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
01f6939935
commit
1438b9dd82
@ -544,9 +544,8 @@ static bool LinkGlobals(Module *Dest, const Module *Src,
|
|||||||
// Make sure to remember this mapping...
|
// Make sure to remember this mapping...
|
||||||
ValueMap.insert(std::make_pair(SGV, DGA));
|
ValueMap.insert(std::make_pair(SGV, DGA));
|
||||||
} else
|
} else
|
||||||
return Error(Err, "Global-Alias Collision on '" +
|
return Error(Err, "Global-Alias Collision on '" + SGV->getName() +
|
||||||
ToStr(SGV->getType(), Src) +"':%"+SGV->getName()+
|
"': symbol multiple defined");
|
||||||
" - symbol multiple defined");
|
|
||||||
} else if (GlobalVariable *DGVar = dyn_cast<GlobalVariable>(DGV)) {
|
} else if (GlobalVariable *DGVar = dyn_cast<GlobalVariable>(DGV)) {
|
||||||
// Otherwise, perform the mapping as instructed by GetLinkageResult.
|
// Otherwise, perform the mapping as instructed by GetLinkageResult.
|
||||||
if (LinkFromSrc) {
|
if (LinkFromSrc) {
|
||||||
@ -638,9 +637,8 @@ static bool LinkAlias(Module *Dest, const Module *Src,
|
|||||||
// If types don't agree due to opaque types, try to resolve them.
|
// If types don't agree due to opaque types, try to resolve them.
|
||||||
if (RecursiveResolveTypes(SGA->getType(), DGA->getType(),
|
if (RecursiveResolveTypes(SGA->getType(), DGA->getType(),
|
||||||
&Dest->getTypeSymbolTable(), ""))
|
&Dest->getTypeSymbolTable(), ""))
|
||||||
return Error(Err, "Alias Collision on '" +
|
return Error(Err, "Alias Collision on '" + SGA->getName()+
|
||||||
ToStr(SGA->getType(), Src) +"':%"+SGA->getName()+
|
"': aliases have different types");
|
||||||
" - aliases have different types");
|
|
||||||
|
|
||||||
// Now types are known to be the same, check whether aliasees equal. As
|
// Now types are known to be the same, check whether aliasees equal. As
|
||||||
// globals are already linked we just need query ValueMap to find the
|
// globals are already linked we just need query ValueMap to find the
|
||||||
@ -653,9 +651,8 @@ static bool LinkAlias(Module *Dest, const Module *Src,
|
|||||||
NewGA = DGA;
|
NewGA = DGA;
|
||||||
// Proceed to 'common' steps
|
// Proceed to 'common' steps
|
||||||
} else
|
} else
|
||||||
return Error(Err, "Alias Collision on '" +
|
return Error(Err, "Alias Collision on '" + SGA->getName()+
|
||||||
ToStr(SGA->getType(), Src) +"':%"+SGA->getName()+
|
"': aliases have different aliasees");
|
||||||
" - aliases have different aliasees");
|
|
||||||
} else if (GlobalVariable *DGV = Dest->getGlobalVariable(SGA->getName())) {
|
} else if (GlobalVariable *DGV = Dest->getGlobalVariable(SGA->getName())) {
|
||||||
RecursiveResolveTypes(SGA->getType(), DGV->getType(),
|
RecursiveResolveTypes(SGA->getType(), DGV->getType(),
|
||||||
&Dest->getTypeSymbolTable(), "");
|
&Dest->getTypeSymbolTable(), "");
|
||||||
@ -680,9 +677,8 @@ static bool LinkAlias(Module *Dest, const Module *Src,
|
|||||||
|
|
||||||
// Proceed to 'common' steps
|
// Proceed to 'common' steps
|
||||||
} else
|
} else
|
||||||
return Error(Err, "Global-Alias Collision on '" +
|
return Error(Err, "Global-Alias Collision on '" + SGA->getName() +
|
||||||
ToStr(SGA->getType(), Src) +"':%"+SGA->getName()+
|
"': symbol multiple defined");
|
||||||
" - symbol multiple defined");
|
|
||||||
} else if (Function *DF = Dest->getFunction(SGA->getName())) {
|
} else if (Function *DF = Dest->getFunction(SGA->getName())) {
|
||||||
RecursiveResolveTypes(SGA->getType(), DF->getType(),
|
RecursiveResolveTypes(SGA->getType(), DF->getType(),
|
||||||
&Dest->getTypeSymbolTable(), "");
|
&Dest->getTypeSymbolTable(), "");
|
||||||
@ -707,9 +703,8 @@ static bool LinkAlias(Module *Dest, const Module *Src,
|
|||||||
|
|
||||||
// Proceed to 'common' steps
|
// Proceed to 'common' steps
|
||||||
} else
|
} else
|
||||||
return Error(Err, "Function-Alias Collision on '" +
|
return Error(Err, "Function-Alias Collision on '" + SGA->getName() +
|
||||||
ToStr(SGA->getType(), Src) +"':%"+SGA->getName()+
|
"': symbol multiple defined");
|
||||||
" - symbol multiple defined");
|
|
||||||
} else {
|
} else {
|
||||||
// Nothing similar found, just copy alias into destination module.
|
// Nothing similar found, just copy alias into destination module.
|
||||||
|
|
||||||
@ -758,9 +753,8 @@ static bool LinkGlobalInits(Module *Dest, const Module *Src,
|
|||||||
if (DGV->hasInitializer()) {
|
if (DGV->hasInitializer()) {
|
||||||
if (SGV->hasExternalLinkage()) {
|
if (SGV->hasExternalLinkage()) {
|
||||||
if (DGV->getInitializer() != SInit)
|
if (DGV->getInitializer() != SInit)
|
||||||
return Error(Err, "Global Variable Collision on '" +
|
return Error(Err, "Global Variable Collision on '" + SGV->getName() +
|
||||||
ToStr(SGV->getType(), Src) +"':%"+SGV->getName()+
|
"': global variables have different initializers");
|
||||||
" - Global variables have different initializers");
|
|
||||||
} else if (DGV->hasLinkOnceLinkage() || DGV->hasWeakLinkage()) {
|
} else if (DGV->hasLinkOnceLinkage() || DGV->hasWeakLinkage()) {
|
||||||
// Nothing is required, mapped values will take the new global
|
// Nothing is required, mapped values will take the new global
|
||||||
// automatically.
|
// automatically.
|
||||||
|
Loading…
Reference in New Issue
Block a user