@@ -248,9 +248,7 @@ namespace vast::cg {
248
248
return VisitTypeOfType (t, quals);
249
249
}
250
250
251
- ty.dump ();
252
- VAST_UNREACHABLE (" unsupported qualified type" );
253
- return Type{};
251
+ return {};
254
252
}
255
253
256
254
auto VisitElaboratedType (const clang::ElaboratedType *ty, qualifiers quals) -> mlir_type {
@@ -274,7 +272,6 @@ namespace vast::cg {
274
272
}
275
273
}
276
274
277
-
278
275
auto *mctx = &mcontext ();
279
276
if (ty->getReturnType ()->isVoidType ()) {
280
277
return mlir::FunctionType::get (mctx, args, {});
@@ -481,12 +478,18 @@ namespace vast::cg {
481
478
}
482
479
483
480
auto Visit (const clang_type *ty) -> mlir_type {
484
- return StoreDataLayout (ty, Base::Visit (ty));
481
+ if (auto gen = Base::Visit (ty)) {
482
+ return StoreDataLayout (ty, gen);
483
+ }
484
+ return {};
485
485
}
486
486
487
487
auto Visit (clang::QualType ty) -> mlir_type {
488
- auto [underlying, quals] = ty.split ();
489
- return StoreDataLayout (underlying, Base::Visit (ty));
488
+ if (auto gen = Base::Visit (ty)) {
489
+ auto [underlying, quals] = ty.split ();
490
+ return StoreDataLayout (underlying, gen);
491
+ }
492
+ return {};
490
493
}
491
494
};
492
495
0 commit comments