mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
Fix message to make more sense and confuse Chris less
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9354 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
db15798e2e
commit
f85770c9a6
@ -463,11 +463,16 @@ static bool LinkGlobals(Module *Dest, const Module *Src,
|
|||||||
"' have different linkage specifiers!");
|
"' have different linkage specifiers!");
|
||||||
} else if (SGV->hasExternalLinkage()) {
|
} else if (SGV->hasExternalLinkage()) {
|
||||||
// Allow linking two exactly identical external global variables...
|
// Allow linking two exactly identical external global variables...
|
||||||
if (SGV->isConstant() != DGV->isConstant() ||
|
if (SGV->isConstant() != DGV->isConstant())
|
||||||
SGV->getInitializer() != DGV->getInitializer())
|
|
||||||
return Error(Err, "Global Variable Collision on '" +
|
return Error(Err, "Global Variable Collision on '" +
|
||||||
SGV->getType()->getDescription() + " %" + SGV->getName() +
|
SGV->getType()->getDescription() + " %" + SGV->getName() +
|
||||||
"' - Global variables differ in const'ness");
|
"' - Global variables differ in const'ness");
|
||||||
|
|
||||||
|
if (SGV->getInitializer() != DGV->getInitializer())
|
||||||
|
return Error(Err, "Global Variable Collision on '" +
|
||||||
|
SGV->getType()->getDescription() + " %" + SGV->getName() +
|
||||||
|
"' - External linkage globals have different initializers");
|
||||||
|
|
||||||
ValueMap.insert(std::make_pair(SGV, DGV));
|
ValueMap.insert(std::make_pair(SGV, DGV));
|
||||||
} else if (SGV->hasLinkOnceLinkage()) {
|
} else if (SGV->hasLinkOnceLinkage()) {
|
||||||
// If the global variable has a name, and that name is already in use in
|
// If the global variable has a name, and that name is already in use in
|
||||||
|
@ -463,11 +463,16 @@ static bool LinkGlobals(Module *Dest, const Module *Src,
|
|||||||
"' have different linkage specifiers!");
|
"' have different linkage specifiers!");
|
||||||
} else if (SGV->hasExternalLinkage()) {
|
} else if (SGV->hasExternalLinkage()) {
|
||||||
// Allow linking two exactly identical external global variables...
|
// Allow linking two exactly identical external global variables...
|
||||||
if (SGV->isConstant() != DGV->isConstant() ||
|
if (SGV->isConstant() != DGV->isConstant())
|
||||||
SGV->getInitializer() != DGV->getInitializer())
|
|
||||||
return Error(Err, "Global Variable Collision on '" +
|
return Error(Err, "Global Variable Collision on '" +
|
||||||
SGV->getType()->getDescription() + " %" + SGV->getName() +
|
SGV->getType()->getDescription() + " %" + SGV->getName() +
|
||||||
"' - Global variables differ in const'ness");
|
"' - Global variables differ in const'ness");
|
||||||
|
|
||||||
|
if (SGV->getInitializer() != DGV->getInitializer())
|
||||||
|
return Error(Err, "Global Variable Collision on '" +
|
||||||
|
SGV->getType()->getDescription() + " %" + SGV->getName() +
|
||||||
|
"' - External linkage globals have different initializers");
|
||||||
|
|
||||||
ValueMap.insert(std::make_pair(SGV, DGV));
|
ValueMap.insert(std::make_pair(SGV, DGV));
|
||||||
} else if (SGV->hasLinkOnceLinkage()) {
|
} else if (SGV->hasLinkOnceLinkage()) {
|
||||||
// If the global variable has a name, and that name is already in use in
|
// If the global variable has a name, and that name is already in use in
|
||||||
|
@ -463,11 +463,16 @@ static bool LinkGlobals(Module *Dest, const Module *Src,
|
|||||||
"' have different linkage specifiers!");
|
"' have different linkage specifiers!");
|
||||||
} else if (SGV->hasExternalLinkage()) {
|
} else if (SGV->hasExternalLinkage()) {
|
||||||
// Allow linking two exactly identical external global variables...
|
// Allow linking two exactly identical external global variables...
|
||||||
if (SGV->isConstant() != DGV->isConstant() ||
|
if (SGV->isConstant() != DGV->isConstant())
|
||||||
SGV->getInitializer() != DGV->getInitializer())
|
|
||||||
return Error(Err, "Global Variable Collision on '" +
|
return Error(Err, "Global Variable Collision on '" +
|
||||||
SGV->getType()->getDescription() + " %" + SGV->getName() +
|
SGV->getType()->getDescription() + " %" + SGV->getName() +
|
||||||
"' - Global variables differ in const'ness");
|
"' - Global variables differ in const'ness");
|
||||||
|
|
||||||
|
if (SGV->getInitializer() != DGV->getInitializer())
|
||||||
|
return Error(Err, "Global Variable Collision on '" +
|
||||||
|
SGV->getType()->getDescription() + " %" + SGV->getName() +
|
||||||
|
"' - External linkage globals have different initializers");
|
||||||
|
|
||||||
ValueMap.insert(std::make_pair(SGV, DGV));
|
ValueMap.insert(std::make_pair(SGV, DGV));
|
||||||
} else if (SGV->hasLinkOnceLinkage()) {
|
} else if (SGV->hasLinkOnceLinkage()) {
|
||||||
// If the global variable has a name, and that name is already in use in
|
// If the global variable has a name, and that name is already in use in
|
||||||
|
Loading…
Reference in New Issue
Block a user