[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

2019-05-09 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC360404: Assume `__cxa_allocate_exception` returns an under-aligned memory on (authored by ahatanak, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION

[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

2019-05-09 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, LGTM. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61667/new/ https://reviews.llvm.org/D61667 ___

[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

2019-05-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 198959. ahatanak added a comment. Update the comment in `CheckCXXThrowOperand`. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61667/new/ https://reviews.llvm.org/D61667 Files: include/clang/AST/ASTContext.h

[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

2019-05-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:946 + // is larger than the minimum alignment the libc++abi runtime guarantees. + if (Context.getTargetInfo().getTriple().isOSDarwin()) { +CharUnits TypeAlign = Context.getTypeAlignInChars(Ty);

[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

2019-05-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/Basic/TargetInfo.h:643 + /// runtime, such as those using the Itanium C++ ABI. + virtual unsigned getExnObjectAlignment() const { +// Itanium says that an _Unwind_Exception has to be "double-word"

[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

2019-05-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 198939. ahatanak marked 6 inline comments as done. ahatanak added a comment. Herald added a subscriber: aheejin. Address review comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61667/new/

[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

2019-05-08 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Basic/DiagnosticGroups.td:411 def OpenCLUnsupportedRGBA: DiagGroup<"opencl-unsupported-rgba">; +def UnderalignedExcpObj : DiagGroup<"underaligned-exception-object">; def DeprecatedObjCIsaUsage :

[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

2019-05-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 198716. ahatanak marked 3 inline comments as done. ahatanak edited the summary of this revision. ahatanak added a comment. Move the code that was in `AlignedExceptionObject.h` to `getExnObjectAlignment` and remove the header. Repository: rC Clang

[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

2019-05-08 Thread Akira Hatanaka via Phabricator via cfe-commits
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:

[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

2019-05-08 Thread John McCall via Phabricator via cfe-commits
rjmccall 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: > ldionne

[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

2019-05-08 Thread John McCall via Phabricator via cfe-commits
rjmccall 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: ldionne wrote: > Would it make

[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

2019-05-08 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: include/clang/Basic/AlignedExceptionObject.h:15 + +#ifndef LLVM_CLANG_BASIC_ALIGNED_ALLOCATION_H +#define LLVM_CLANG_BASIC_ALIGNED_ALLOCATION_H The guards look wrong. Comment at:

[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

2019-05-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, ldionne. ahatanak added a project: clang. Herald added a reviewer: EricWF. Herald added subscribers: dexonsmith, jkorous. This patch resurrects r264998, which was committed to work around a bug in libc++abi that was causing