diff options
Diffstat (limited to 'clang/lib/CodeGen/Targets/Mips.cpp')
| -rw-r--r-- | clang/lib/CodeGen/Targets/Mips.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/Targets/Mips.cpp b/clang/lib/CodeGen/Targets/Mips.cpp index e12a34ce07bb..f26ab974d699 100644 --- a/clang/lib/CodeGen/Targets/Mips.cpp +++ b/clang/lib/CodeGen/Targets/Mips.cpp @@ -153,7 +153,7 @@ llvm::Type* MipsABIInfo::HandleAggregates(QualType Ty, uint64_t TySize) const { if (Ty->isComplexType()) return CGT.ConvertType(Ty); - const RecordType *RT = Ty->getAs<RecordType>(); + const RecordType *RT = Ty->getAsCanonical<RecordType>(); // Unions/vectors are passed in integer registers. if (!RT || !RT->isStructureOrClassType()) { @@ -241,8 +241,8 @@ MipsABIInfo::classifyArgumentType(QualType Ty, uint64_t &Offset) const { } // Treat an enum type as its underlying type. - if (const EnumType *EnumTy = Ty->getAs<EnumType>()) - Ty = EnumTy->getOriginalDecl()->getDefinitionOrSelf()->getIntegerType(); + if (const auto *ED = Ty->getAsEnumDecl()) + Ty = ED->getIntegerType(); // Make sure we pass indirectly things that are too large. if (const auto *EIT = Ty->getAs<BitIntType>()) @@ -261,7 +261,7 @@ MipsABIInfo::classifyArgumentType(QualType Ty, uint64_t &Offset) const { llvm::Type* MipsABIInfo::returnAggregateInRegs(QualType RetTy, uint64_t Size) const { - const RecordType *RT = RetTy->getAs<RecordType>(); + const RecordType *RT = RetTy->getAsCanonical<RecordType>(); SmallVector<llvm::Type*, 8> RTList; if (RT && RT->isStructureOrClassType()) { @@ -332,8 +332,8 @@ ABIArgInfo MipsABIInfo::classifyReturnType(QualType RetTy) const { } // Treat an enum type as its underlying type. - if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) - RetTy = EnumTy->getOriginalDecl()->getDefinitionOrSelf()->getIntegerType(); + if (const auto *ED = RetTy->getAsEnumDecl()) + RetTy = ED->getIntegerType(); // Make sure we pass indirectly things that are too large. if (const auto *EIT = RetTy->getAs<BitIntType>()) |
