[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall closed this revision. rjmccall added a comment. Committed. https://reviews.llvm.org/D35180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-11 Thread Benoit Vey via Phabricator via cfe-commits
Praetonus added a comment. I forgot to mention that I don't have commit access. If you or somebody else could commit this it would be great. https://reviews.llvm.org/D35180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-11 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. Still looks good to me. Do you need help committing? https://reviews.llvm.org/D35180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 Thread Benoit Vey via Phabricator via cfe-commits
Praetonus updated this revision to Diff 105803. Praetonus added a comment. Patch updated to adhere to the coding style based on @majnemer's comments. https://reviews.llvm.org/D35180 Files: include/clang/CodeGen/CodeGenABITypes.h lib/CodeGen/CodeGenABITypes.cpp Index:

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: lib/CodeGen/CodeGenABITypes.cpp:71 + assert(FD != nullptr && "Expected a non-null function declaration!"); + llvm::Type* T = CGM.getTypes().ConvertFunctionType(FD->getType(), FD); + Pointers lean right.

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-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. Looks great, thanks! https://reviews.llvm.org/D35180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 Thread Benoit Vey via Phabricator via cfe-commits
Praetonus updated this revision to Diff 105795. Praetonus marked 3 inline comments as done. Praetonus added a comment. Patch updated. I've made the convertFreeFunctionType return null on failure. https://reviews.llvm.org/D35180 Files: include/clang/CodeGen/CodeGenABITypes.h

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Hmm. Maybe it would make more sense to allow it to return null, and then add a comment explaining that it will do so if it can't lower the function type yet. https://reviews.llvm.org/D35180 ___ cfe-commits mailing list

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 Thread Benoit Vey via Phabricator via cfe-commits
Praetonus updated this revision to Diff 105793. Praetonus added a comment. Patch updated based on @rjmccall's comments. I removed the wrapper for the ConvertType function, after giving it some thoughts I don't see any use case for it, I guess I added it by default. I left the

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Exposing these operations seems fine, but I'm not thrilled about the APIs. Of course, the APIs are exactly derived from IRGen's internal APIs, but we'd like to eventually clean those APIs up, and we certainly don't need to emulate them. Comment at:

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-09 Thread Benoit Vey via Phabricator via cfe-commits
Praetonus created this revision. This change exposes the various CodeGenTypes::ConvertType functions in the public Clang API. This allows external tools using the Clang API to rely on it to generate LLVM types from C types. The precise use case that motivated this change is explained in an