mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-19 08:24:12 +00:00
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:
parent
ae711a8b48
commit
afd0b4b24a
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user