[cfe-dev] clang tooling - Type sizes VS architectures

Julian Mueller via cfe-dev cfe-dev at lists.llvm.org
Tue Dec 18 13:04:19 PST 2018


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:


yet, this has no effect.

Could someone elaborate on this?

Mit freundlichen Grüßen,
Julian Müller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181218/1491fee0/attachment.html>

More information about the cfe-dev mailing list