[PATCH] D44813: Add support for __attribute__(trivial_abi)

Jim Ingham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 22 18:06:50 PDT 2018


jingham created this revision.
jingham added reviewers: aprantl, labath.
Herald added subscribers: llvm-commits, JDevlieghere.

clang added support for the "trivial_abi" which allows structs that would usually be passed in memory in C++ to be passed in registers instead.

This patch reads in the DWARF attribute that specifies a data type is using this ABI, and marks the Clang type appropriately.

It also adds the decorator goo to skip the test if the compiler doesn't support this attribute.

It also adds a test that tests that we can handle the same struct with and without this attribute in the expression parser and can fetch the return value for it properly.  Ironically, the lldb return value code for x86_64 only uses struct size & alignment to tell it how structs would be returned.  By that computation this struct should have been returned in registers.  So the part of the test handling the non-trivial return is xfailed.


Repository:
  rL LLVM

https://reviews.llvm.org/D44813

Files:
  packages/Python/lldbsuite/test/decorators.py
  packages/Python/lldbsuite/test/lang/cpp/trivial_abi/Makefile
  packages/Python/lldbsuite/test/lang/cpp/trivial_abi/TestTrivialABI.py
  packages/Python/lldbsuite/test/lang/cpp/trivial_abi/main.cpp
  source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44813.139543.patch
Type: text/x-patch
Size: 7825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180323/c6c99903/attachment.bin>


More information about the llvm-commits mailing list