[PATCH] D102015: [clang CodeGen] Don't crash on large atomic function parameter.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 6 21:19:54 PDT 2021


rjmccall added a comment.

Objective-C object types also have aggregate evaluation kind.  Those can only be used as value types in an old, fragile ObjC ABI, but I believe we haven't yet formally decided to remove support for that.  Fortunately, however, there's a much better simplification available: this `hasAggregateEvaluationKind(Ty)` call is literally doing nothing that couldn't just be a `getAs<RecordType>()` call, and then we don't need to worry about it.

...I'm confused about why this code is doing what it's doing with cleanups, though.  Why does it only apply when the parameter is indirect?  I believe `isParamDestroyedInCallee()` can apply to types that are passed in other ways, so where we pushing the destructor for those, and why isn't it good enough to handle this case as well?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102015/new/

https://reviews.llvm.org/D102015



More information about the cfe-commits mailing list