clang tooling - Type sizes VS architectures

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

clang tooling - Type sizes VS architectures

Richard Smith via cfe-dev
Hi

I am wondering how one can teach his/her clang tool to consider compilation on certain architectures?

For example, my tool gets a certain declaration's Type size like this:

sizeof_type_in_byte = ast_context.getTypeInfo(some_decl->getType()).Width/8;

I can't find a way to tell my ClangTool instance what architecture to consider when building the ASTs.
I looked at the argumentAdjusters, specifically tried out:

Tool.appendArgumentsAdjuster(clang::tooling::getInsertArgumentAdjuster("-m32"));

yet, this has no effect.

Could someone elaborate on this?
Thanks!


--
Mit freundlichen Grüßen,
Julian Müller


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev