[cfe-dev] Clang plugin and CodeGen
Antonio CP via cfe-dev
cfe-dev at lists.llvm.org
Fri Oct 9 16:03:37 PDT 2020
Hi,
We are evaluating adding a new type to llvm. I am focusing on exposing this
type in c/c++. For now, I am going to expose it via the attribute annotate,
something like:
__attribute__((annotate("new_type"))) int x;
I think the main option is to create a new clang TypeNode that will
eventually map to the llvm type during the CodeGen phase (e.g.
CodeGenTypes::ConvertType).
Since this is still in the experimental phase, I would like to minimize the
amount of changes in the main clang source code. Instead of the new
TypeNode, is it possible to use a clang plugin to achieve this? I was
thinking something like: if the type is an int with this annotation then
change type to the new llvm type.
Just want to double check before starting to add the new TypeNode which
requires changes in several files.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20201009/e30fdbd3/attachment.html>
More information about the cfe-dev
mailing list