Special case aliases in GlobalValue::getSection.

This is similar to the getAlignment patch, but is done just for
completeness. It looks like we never call getSection on an alias. All the
tests still pass if the if is replaced with an assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208139 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-05-06 22:44:30 +00:00
parent 8abb75bc61
commit 26668d093e
3 changed files with 8 additions and 3 deletions
-1
View File
@@ -476,7 +476,6 @@ void Verifier::visitGlobalAlias(const GlobalAlias &GA) {
Assert1(GA.getType() == GA.getAliasee()->getType(),
"Alias and aliasee types should match!", &GA);
Assert1(!GA.hasUnnamedAddr(), "Alias cannot have unnamed_addr!", &GA);
Assert1(!GA.hasSection(), "Alias cannot have a section!", &GA);
const Constant *Aliasee = GA.getAliasee();
const GlobalValue *GV = dyn_cast<GlobalValue>(Aliasee);