aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-06-01 08:18:30 +0000
committerDuncan Sands <baldrick@free.fr>2007-06-01 08:18:30 +0000
commit398898cc6a4cba85d908444a2bb42b1a9fc3df2a (patch)
tree97a9bff0a3edc529be0e605e198da609ef805273
parent8c52938e44c6eacfee5faf7103e567f79fa5ebef (diff)
Since TypeInfos are passed as i8 pointers, a NULL TypeInfo should be passed
as a null i8 pointer not as a 0 i32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37383 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 8a3ad8a31c..cfdf6d0ea5 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -2620,8 +2620,7 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
for (unsigned i = 3, N = I.getNumOperands(); i < N; ++i) {
Constant *C = cast<Constant>(I.getOperand(i));
GlobalVariable *GV = ExtractGlobalVariable(C);
- assert (GV || (isa<ConstantInt>(C) &&
- cast<ConstantInt>(C)->isNullValue()) &&
+ assert (GV || isa<ConstantPointerNull>(C) &&
"TypeInfo must be a global variable or NULL");
TyInfo.push_back(GV);
}
@@ -2653,8 +2652,7 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
// Find the type id for the given typeinfo.
Constant *C = cast<Constant>(I.getOperand(1));
GlobalVariable *GV = ExtractGlobalVariable(C);
- assert (GV || (isa<ConstantInt>(C) &&
- cast<ConstantInt>(C)->isNullValue()) &&
+ assert (GV || isa<ConstantPointerNull>(C) &&
"TypeInfo must be a global variable or NULL");
unsigned TypeID = MMI->getTypeIDFor(GV);