diff options
author | Duncan Sands <baldrick@free.fr> | 2007-06-01 08:18:30 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2007-06-01 08:18:30 +0000 |
commit | 706421e712f675ab35dd05376d30bf2032a296dc (patch) | |
tree | 7b341e2a62dd553b153e46d084cf6fa24cb7b564 /llvm/lib/CodeGen/SelectionDAG | |
parent | 6a2cf070cceba3e81a1b12b13dcb42cd6fa08671 (diff) | |
download | bcm5719-llvm-706421e712f675ab35dd05376d30bf2032a296dc.tar.gz bcm5719-llvm-706421e712f675ab35dd05376d30bf2032a296dc.zip |
Since TypeInfos are passed as i8 pointers, a NULL TypeInfo should be passed
as a null i8 pointer not as a 0 i32.
llvm-svn: 37383
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 8a3ad8a31c4..cfdf6d0ea57 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/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); |