[PATCH] Add CodeGenABITypes.h for use in LLDB.

Mark Lacey mark.lacey at apple.com
Fri Oct 25 15:24:11 PDT 2013


Hi cfe-commits -

Please review and let me know if you have any feedback. John McCall already did an off-list review but I wanted to give the community an opportunity before committing.

Thanks,

Mark

--------

CodeGenABITypes is a wrapper built on top of CodeGenModule that exposes
some of the functionality of CodeGenTypes (held by CodeGenModule),
specifically methods that determine the LLVM types appropriate for
function argument and return values.

I addition to CodeGenABITypes.h, CGFunctionInfo.h is introduced, and the
definitions of ABIArgInfo, RequiredArgs, and CGFunctionInfo are moved
into this new header from the private headers ABIInfo.h and CGCall.h.

Exposing this functionality is one part of making it possible for LLDB
to determine the actual ABI locations of function arguments and return
values, making it possible for it to determine this for any supported
target without hard-coding ABI knowledge in the LLDB code.
---
include/clang/CodeGen/CGFunctionInfo.h  | 361 ++++++++++++++++++++++++++++++++
include/clang/CodeGen/CodeGenABITypes.h |  79 +++++++
lib/CodeGen/ABIInfo.h                   | 145 -------------
lib/CodeGen/CGAtomic.cpp                |   1 +
lib/CodeGen/CGBuiltin.cpp               |   1 +
lib/CodeGen/CGCall.cpp                  |   1 +
lib/CodeGen/CGCall.h                    | 180 ----------------
lib/CodeGen/CGClass.cpp                 |   1 +
lib/CodeGen/CGDecl.cpp                  |   1 +
lib/CodeGen/CGExprCXX.cpp               |   1 +
lib/CodeGen/CGObjC.cpp                  |   1 +
lib/CodeGen/CGObjCMac.cpp               |   1 +
lib/CodeGen/CGObjCRuntime.cpp           |   1 +
lib/CodeGen/CGVTables.cpp               |   1 +
lib/CodeGen/CMakeLists.txt              |   1 +
lib/CodeGen/CodeGenABITypes.cpp         |  69 ++++++
lib/CodeGen/CodeGenFunction.cpp         |   1 +
lib/CodeGen/CodeGenTypes.cpp            |   1 +
lib/CodeGen/TargetInfo.cpp              |   1 +
19 files changed, 523 insertions(+), 325 deletions(-)
create mode 100644 include/clang/CodeGen/CGFunctionInfo.h
create mode 100644 include/clang/CodeGen/CodeGenABITypes.h
create mode 100644 lib/CodeGen/CodeGenABITypes.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-CodeGenABITypes.h-for-use-in-LLDB.patch
Type: text/x-patch
Size: 37608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131025/ddb05b13/attachment.bin>


More information about the cfe-commits mailing list