mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-04 02:24:29 +00:00
[opaque pointer type] Cleanup a few references to pointee types using nearby non-pointee types of the same value
& cleanup a convoluted return expression while I'm here git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236912 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1503,7 +1503,7 @@ void Verifier::VerifyStatepoint(ImmutableCallSite CS) {
|
|||||||
const PointerType *PT = dyn_cast<PointerType>(Target->getType());
|
const PointerType *PT = dyn_cast<PointerType>(Target->getType());
|
||||||
Assert(PT && PT->getElementType()->isFunctionTy(),
|
Assert(PT && PT->getElementType()->isFunctionTy(),
|
||||||
"gc.statepoint callee must be of function pointer type", &CI, Target);
|
"gc.statepoint callee must be of function pointer type", &CI, Target);
|
||||||
FunctionType *TargetFuncType = cast<FunctionType>(PT->getElementType());
|
FunctionType *TargetFuncType = CS.getFunctionType();
|
||||||
|
|
||||||
const Value *NumCallArgsV = CS.getArgument(1);
|
const Value *NumCallArgsV = CS.getArgument(1);
|
||||||
Assert(isa<ConstantInt>(NumCallArgsV),
|
Assert(isa<ConstantInt>(NumCallArgsV),
|
||||||
@ -3065,8 +3065,8 @@ bool Verifier::VerifyIntrinsicType(Type *Ty,
|
|||||||
dyn_cast<PointerType>(ThisArgVecTy->getVectorElementType());
|
dyn_cast<PointerType>(ThisArgVecTy->getVectorElementType());
|
||||||
if (!ThisArgEltTy)
|
if (!ThisArgEltTy)
|
||||||
return true;
|
return true;
|
||||||
return (!(ThisArgEltTy->getElementType() ==
|
return ThisArgEltTy->getElementType() !=
|
||||||
ReferenceType->getVectorElementType()));
|
ReferenceType->getVectorElementType();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
llvm_unreachable("unhandled");
|
llvm_unreachable("unhandled");
|
||||||
@ -3192,7 +3192,7 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
|
|||||||
Assert(AI, "llvm.gcroot parameter #1 must be an alloca.", &CI);
|
Assert(AI, "llvm.gcroot parameter #1 must be an alloca.", &CI);
|
||||||
Assert(isa<Constant>(CI.getArgOperand(1)),
|
Assert(isa<Constant>(CI.getArgOperand(1)),
|
||||||
"llvm.gcroot parameter #2 must be a constant.", &CI);
|
"llvm.gcroot parameter #2 must be a constant.", &CI);
|
||||||
if (!AI->getType()->getElementType()->isPointerTy()) {
|
if (!AI->getAllocatedType()->isPointerTy()) {
|
||||||
Assert(!isa<ConstantPointerNull>(CI.getArgOperand(1)),
|
Assert(!isa<ConstantPointerNull>(CI.getArgOperand(1)),
|
||||||
"llvm.gcroot parameter #1 must either be a pointer alloca, "
|
"llvm.gcroot parameter #1 must either be a pointer alloca, "
|
||||||
"or argument #2 must be a non-null constant.",
|
"or argument #2 must be a non-null constant.",
|
||||||
|
Reference in New Issue
Block a user