projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3cb4dda
)
Let Verifier check aliasees
author
Anton Korobeynikov
<asl@math.spbu.ru>
Sat, 28 Apr 2007 14:35:41 +0000
(14:35 +0000)
committer
Anton Korobeynikov
<asl@math.spbu.ru>
Sat, 28 Apr 2007 14:35:41 +0000
(14:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36540
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Verifier.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Verifier.cpp
b/lib/VMCore/Verifier.cpp
index 01eb860f911b108db91028ebcdcf2389bb12fcbe..c580e70d84eaabdba4577a669ec8b03a194b6162 100644
(file)
--- a/
lib/VMCore/Verifier.cpp
+++ b/
lib/VMCore/Verifier.cpp
@@
-319,6
+319,13
@@
void Verifier::visitGlobalAlias(GlobalAlias &GA) {
Assert1(GA.getType() == GA.getAliasee()->getType(),
"Alias and aliasee types should match!", &GA);
+ if (!isa<GlobalValue>(GA.getAliasee())) {
+ const ConstantExpr *CE = dyn_cast<ConstantExpr>(GA.getAliasee());
+ Assert1(CE && CE->getOpcode() == Instruction::BitCast,
+ "Aliasee should be either GlobalValue or bitcast of GlobalValue",
+ &GA);
+ }
+
visitGlobalValue(GA);
}