diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 6 | ||||
-rw-r--r-- | lib/IR/Verifier.cpp | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index ebca8e544b..66ce4e1075 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -928,11 +928,7 @@ bool AsmPrinter::doFinalization(Module &M) { MCSymbol *Name = getSymbol(I); const GlobalValue *GV = I->getAliasedGlobal(); - if (GV->isDeclaration()) { - report_fatal_error(Name->getName() + - ": Target doesn't support aliases to declarations"); - } - + assert(!GV->isDeclaration()); MCSymbol *Target = getSymbol(GV); if (I->hasExternalLinkage() || !MAI->getWeakRefDirective()) diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index fcdbac2f9f..2fc77cc2d7 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -501,6 +501,7 @@ void Verifier::visitGlobalAlias(const GlobalAlias &GA) { &GA); } } + Assert1(!GV->isDeclaration(), "Alias must point to a definition", &GA); const GlobalValue* Resolved = GA.resolveAliasedGlobal(/*stopOnWeak*/ false); Assert1(Resolved, |