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

Reid Kleckner rnk at google.com
Wed Oct 30 13:12:51 PDT 2013


While you're moving this code around, it should probably follow the
convention for namespaces:
http://llvm.org/docs/CodingStandards.html#namespace-indentation

Otherwise, go for it.

---

I seem to recall that Cray wanted something like this at one point, but I
think they were solving a different problem.  They were trying to produce
LLVM IR from a different C++ frontend and wanted to reuse the unfortunately
overly complicated logic in clang for how we map that down to LLVM IR.  I
guess this won't help them, since it takes in clang AST nodes, which they
don't have.


On Wed, Oct 30, 2013 at 9:54 AM, Mark Lacey <mark.lacey at apple.com> wrote:

> Ping?
>
> Given John’s sign-off are there any objections to just committing this at
> this point?
>
> Mark
>
> On Oct 25, 2013, at 3:24 PM, Mark Lacey <mark.lacey at apple.com> wrote:
>
> > 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
> >
> > <0001-Add-CodeGenABITypes.h-for-use-in-LLDB.patch>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131030/2dadf55c/attachment.html>


More information about the cfe-commits mailing list