forked from OSchip/llvm-project
TargetInfo.cpp - use castAs<> instead of getAs<> as we dereference the pointer directly. NFCI.
castAs<> will assert the correct cast type instead of just returning null, which we then try to dereference immediately.
This commit is contained in:
parent
eb7ea5aa1a
commit
9d996c01aa
|
@ -10394,7 +10394,7 @@ void RISCVABIInfo::computeInfo(CGFunctionInfo &FI) const {
|
|||
if (!IsRetIndirect && RetTy->isScalarType() &&
|
||||
getContext().getTypeSize(RetTy) > (2 * XLen)) {
|
||||
if (RetTy->isComplexType() && FLen) {
|
||||
QualType EltTy = RetTy->getAs<ComplexType>()->getElementType();
|
||||
QualType EltTy = RetTy->castAs<ComplexType>()->getElementType();
|
||||
IsRetIndirect = getContext().getTypeSize(EltTy) > FLen;
|
||||
} else {
|
||||
// This is a normal scalar > 2*XLen, such as fp128 on RV32.
|
||||
|
|
Loading…
Reference in New Issue