summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/Targets/WebAssembly.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/Targets/WebAssembly.cpp')
-rw-r--r--clang/lib/CodeGen/Targets/WebAssembly.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/Targets/WebAssembly.cpp b/clang/lib/CodeGen/Targets/WebAssembly.cpp
index ac8dcd2a0540..ebe996a4edd8 100644
--- a/clang/lib/CodeGen/Targets/WebAssembly.cpp
+++ b/clang/lib/CodeGen/Targets/WebAssembly.cpp
@@ -115,11 +115,9 @@ ABIArgInfo WebAssemblyABIInfo::classifyArgumentType(QualType Ty) const {
return ABIArgInfo::getDirect(CGT.ConvertType(QualType(SeltTy, 0)));
// For the experimental multivalue ABI, fully expand all other aggregates
if (Kind == WebAssemblyABIKind::ExperimentalMV) {
- const RecordType *RT = Ty->getAs<RecordType>();
- assert(RT);
+ const auto *RD = Ty->castAsRecordDecl();
bool HasBitField = false;
- for (auto *Field :
- RT->getOriginalDecl()->getDefinitionOrSelf()->fields()) {
+ for (auto *Field : RD->fields()) {
if (Field->isBitField()) {
HasBitField = true;
break;