[PATCH] D61667: Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if the version of libc++abi isn't new enough to include the fix in r319123

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 8 13:40:47 PDT 2019


ahatanak marked an inline comment as done.
ahatanak added inline comments.


================
Comment at: include/clang/Basic/AlignedExceptionObject.h:31
+  case llvm::Triple::MacOSX: // Earliest supporting version is 10.14.
+    return llvm::VersionTuple(10U, 14U);
+  case llvm::Triple::IOS:
----------------
rjmccall wrote:
> rjmccall wrote:
> > ldionne wrote:
> > > Would it make more sense to return the alignment directly here?
> > I agree: this should be a function returning the minimum expected exception alignment on the current target.  Also, why does this have its own header instead of being, say, a function on `TargetInfo`?
> Or `ASTContext` or something similar.
I moved the code in `alignedExceptionObjectMinVersion` to `getExnObjectAlignment` and deleted the header.


Repository:
  rC Clang

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

https://reviews.llvm.org/D61667





More information about the cfe-commits mailing list