[PATCH] D28425: Lit C++11 Compatibility Patch - nonthrowing destructors

Charles Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 6 17:16:04 PST 2017


tigerleapgorge created this revision.
tigerleapgorge added reviewers: rjmccall, rsmith.
tigerleapgorge added a subscriber: cfe-commits.

Hi everyone,

I am Charles Li at Sony Playstation.
I am refactoring my existing C++11 compatibility patches to make them easier to review.
This patch is a subset of the previous #11 patch  (https://reviews.llvm.org/D24812)
This patch contains 7 tests.
The changes to each test are nearly identical:
LLVM IR invocation for the destructors has changed from “invoke” to “call”.

My colleague Paul Robinson has submitted a similar patch (https://reviews.llvm.org/D27936).
To quote his explanation:

  "If a dtor has no interesting members, then it ends up being nothrow, which affects the generated IR.
  Modify some tests to tolerate this difference between C++03 and C++11.
  
  In C++11, a destructor without an explicit exception-spec gets an implicit exception-spec.
  If the dtor has a body, the implicit exception-spec permits throwing exactly the set of types thrown by anything the dtor calls.
  If the dtor doesn't have a body, use what would be the default dtor's body to determine the implicit exception-spec.
  If there are no calls, the implicit exception-spec is nothrow."


https://reviews.llvm.org/D28425

Files:
  test/CodeGenCXX/arm.cpp
  test/CodeGenCXX/debug-info-class.cpp
  test/CodeGenCXX/eh-aggregate-copy-destroy.cpp
  test/CodeGenCXX/exceptions.cpp
  test/CodeGenCXX/goto.cpp
  test/OpenMP/atomic_codegen.cpp
  test/OpenMP/threadprivate_codegen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28425.83470.patch
Type: text/x-patch
Size: 19424 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170107/1064b634/attachment-0001.bin>


More information about the cfe-commits mailing list