[llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp
Anton Korobeynikov
asl at math.spbu.ru
Sat Apr 28 07:35:59 PDT 2007
Changes in directory llvm/lib/VMCore:
Verifier.cpp updated: 1.207 -> 1.208
---
Log message:
Let Verifier check aliasees
---
Diffs of the changes: (+7 -0)
Verifier.cpp | 7 +++++++
1 files changed, 7 insertions(+)
Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.207 llvm/lib/VMCore/Verifier.cpp:1.208
--- llvm/lib/VMCore/Verifier.cpp:1.207 Sat Apr 28 08:45:00 2007
+++ llvm/lib/VMCore/Verifier.cpp Sat Apr 28 09:35:41 2007
@@ -319,6 +319,13 @@
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);
}
More information about the llvm-commits
mailing list