diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-06 16:48:58 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-06 16:48:58 +0000 |
commit | b8894488415a81bb6bdaf9851acacc93a4e7cfe2 (patch) | |
tree | 2492746ffe3883ef48a18427846a8634262594c2 /lib/IR/Verifier.cpp | |
parent | bfc3f301b6a5390b990c4abb05d134ffe8bb59bb (diff) | |
download | llvm-b8894488415a81bb6bdaf9851acacc93a4e7cfe2.tar.gz llvm-b8894488415a81bb6bdaf9851acacc93a4e7cfe2.tar.bz2 llvm-b8894488415a81bb6bdaf9851acacc93a4e7cfe2.tar.xz |
Special case aliases in GlobalValue::getAlignment.
An alias has the address of what it points to, so it also has the same
alignment.
This allows a few optimizations to see past aliases for free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208103 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Verifier.cpp')
-rw-r--r-- | lib/IR/Verifier.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index 0bc5c509eb..bc378aed16 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -477,7 +477,6 @@ void Verifier::visitGlobalAlias(const GlobalAlias &GA) { "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(); const GlobalValue *GV = dyn_cast<GlobalValue>(Aliasee); |