const PointerType *PT = dyn_cast<PointerType>(Target->getType());
Assert(PT && PT->getElementType()->isFunctionTy(),
"gc.statepoint callee must be of function pointer type", &CI, Target);
- FunctionType *TargetFuncType = CS.getFunctionType();
+ FunctionType *TargetFuncType = cast<FunctionType>(PT->getElementType());
const Value *NumCallArgsV = CS.getArgument(1);
Assert(isa<ConstantInt>(NumCallArgsV),
dyn_cast<PointerType>(ThisArgVecTy->getVectorElementType());
if (!ThisArgEltTy)
return true;
- return ThisArgEltTy->getElementType() !=
- ReferenceType->getVectorElementType();
+ return (!(ThisArgEltTy->getElementType() ==
+ ReferenceType->getVectorElementType()));
}
}
llvm_unreachable("unhandled");
Assert(AI, "llvm.gcroot parameter #1 must be an alloca.", &CI);
Assert(isa<Constant>(CI.getArgOperand(1)),
"llvm.gcroot parameter #2 must be a constant.", &CI);
- if (!AI->getAllocatedType()->isPointerTy()) {
+ if (!AI->getType()->getElementType()->isPointerTy()) {
Assert(!isa<ConstantPointerNull>(CI.getArgOperand(1)),
"llvm.gcroot parameter #1 must either be a pointer alloca, "
"or argument #2 must be a non-null constant.",