llvm.org GIT mirror llvm / f85770c
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 Chris Lattner 16 years ago
3 changed file(s) with 21 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
462462 "' have different linkage specifiers!");
463463 } else if (SGV->hasExternalLinkage()) {
464464 // Allow linking two exactly identical external global variables...
465 if (SGV->isConstant() != DGV->isConstant() ||
466 SGV->getInitializer() != DGV->getInitializer())
465 if (SGV->isConstant() != DGV->isConstant())
467466 return Error(Err, "Global Variable Collision on '" +
468467 SGV->getType()->getDescription() + " %" + SGV->getName() +
469468 "' - Global variables differ in const'ness");
469
470 if (SGV->getInitializer() != DGV->getInitializer())
471 return Error(Err, "Global Variable Collision on '" +
472 SGV->getType()->getDescription() + " %" + SGV->getName() +
473 "' - External linkage globals have different initializers");
474
470475 ValueMap.insert(std::make_pair(SGV, DGV));
471476 } else if (SGV->hasLinkOnceLinkage()) {
472477 // If the global variable has a name, and that name is already in use in
462462 "' have different linkage specifiers!");
463463 } else if (SGV->hasExternalLinkage()) {
464464 // Allow linking two exactly identical external global variables...
465 if (SGV->isConstant() != DGV->isConstant() ||
466 SGV->getInitializer() != DGV->getInitializer())
465 if (SGV->isConstant() != DGV->isConstant())
467466 return Error(Err, "Global Variable Collision on '" +
468467 SGV->getType()->getDescription() + " %" + SGV->getName() +
469468 "' - Global variables differ in const'ness");
469
470 if (SGV->getInitializer() != DGV->getInitializer())
471 return Error(Err, "Global Variable Collision on '" +
472 SGV->getType()->getDescription() + " %" + SGV->getName() +
473 "' - External linkage globals have different initializers");
474
470475 ValueMap.insert(std::make_pair(SGV, DGV));
471476 } else if (SGV->hasLinkOnceLinkage()) {
472477 // If the global variable has a name, and that name is already in use in
462462 "' have different linkage specifiers!");
463463 } else if (SGV->hasExternalLinkage()) {
464464 // Allow linking two exactly identical external global variables...
465 if (SGV->isConstant() != DGV->isConstant() ||
466 SGV->getInitializer() != DGV->getInitializer())
465 if (SGV->isConstant() != DGV->isConstant())
467466 return Error(Err, "Global Variable Collision on '" +
468467 SGV->getType()->getDescription() + " %" + SGV->getName() +
469468 "' - Global variables differ in const'ness");
469
470 if (SGV->getInitializer() != DGV->getInitializer())
471 return Error(Err, "Global Variable Collision on '" +
472 SGV->getType()->getDescription() + " %" + SGV->getName() +
473 "' - External linkage globals have different initializers");
474
470475 ValueMap.insert(std::make_pair(SGV, DGV));
471476 } else if (SGV->hasLinkOnceLinkage()) {
472477 // If the global variable has a name, and that name is already in use in