From 573c0503e3bedf5856e1b94969bfd770a927124e Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 13 Feb 2014 18:26:41 +0000 Subject: Check that GlobalAliases don't have section or alignment. An alias is always in the section of its aliasee and has the same alignment (since it has the same address). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201354 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/Verifier.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/IR/Verifier.cpp') diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index f81260960e..73496b4f55 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -475,6 +475,8 @@ 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); + Assert1(!GA.getAlignment(), "Alias connot have an alignment", &GA); const Constant *Aliasee = GA.getAliasee(); -- cgit v1.2.3