mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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
This commit is contained in:
parent
8c52938e44
commit
398898cc6a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user