Fix problem Reid was having with external globals and nonexternal linkage

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10133 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-11-21 20:33:27 +00:00
parent ae711a8b48
commit afd0b4b24a

View File

@ -108,8 +108,7 @@ namespace { // Anonymous namespace for class
visitGlobalValue(*I);
for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I)
if (I->isExternal() && I->hasInternalLinkage())
CheckFailed("Global Variable is external with internal linkage!", I);
visitGlobalValue(*I);
// If the module is broken, abort at this time.
abortIfBroken();
@ -203,7 +202,7 @@ namespace { // Anonymous namespace for class
void Verifier::visitGlobalValue(GlobalValue &GV) {
Assert1(!GV.isExternal() || GV.hasExternalLinkage(),
"Global value has Internal Linkage!", &GV);
"Global is external, but doesn't have external linkage!", &GV);
Assert1(!GV.hasAppendingLinkage() || isa<GlobalVariable>(GV),
"Only global variables can have appending linkage!", &GV);