Hello, This patch is 3 functions in libclang to get more Record Layout information from the AST when using libclang.
I am trying to implement the python ctypeslib record generator by replacing gccxml with libclang. Files: 001: include/clang-c/Index.h tools/libclang/libclang.exports tools/libclang/CXType.cpp 002: test/Index/record-layout.cpp test/Index/record-layout.c test/Index/record-layout-virtual.cpp tools/c-index-test/c-index-test.c 003: bindings/python/clang/cindex.py 004: bindings/python/tests/cindex/util.py bindings/python/tests/cindex/test_type.py Here is the latest version following your comments. Given that I'm pretty sure the -m32/-m64 flag is not sufficient. lets say this is a draft for you to comment on. PS: I get a assertion error if record-layout-virtual.cpp is renamed as record-layout-virtual.c. c-index-test: /home/jal/compil/llvm/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp:2470: const clang::ASTRecordLayout& clang::ASTContext::getASTRecordLayout(const clang::RecordDecl*) const: Assertion `D && "Cannot get layout of forward declarations!"' failed. I am not sure that error ( provoked by c++ in a .c file ) is actually part of my code or not. I have no knowledge of forward declaration or solution to that problem. -- Loïc Jaquemet
expose-ast-record-layout-001
Description: Binary data
expose-ast-record-layout-002-tests
Description: Binary data
expose-ast-record-layout-003-python-bindings
Description: Binary data
expose-ast-record-layout-004-python-bindings-tests
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
