[PATCH] [libclang] getTypeSize patch

Sam Price thesamprice at gmail.com
Fri Feb 22 15:22:57 PST 2013


Added a command to grab the the size, and the proper hooks to access it
 within python bindings.

    Functions, and void types returned 0 in size
    long long clang_getTypeSize(CXType CT ) {
      CXTranslationUnit TU = GetTU(CT);
      ASTUnit *AU = clang::cxtu::getASTUnit(TU);
      const ASTContext &AC = AU->getASTContext();
      QualType T = GetQualType(CT);
      return AC.getTypeSize(T);
    }

-- 
Thank you,

Sam Price
(707) 742-3726
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130222/0d6532ed/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GetTypeSize.diff
Type: application/octet-stream
Size: 3158 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130222/0d6532ed/attachment.obj>


More information about the cfe-commits mailing list