[cfe-dev] How to add an option to clang
redder_0210
redder_0210 at yeah.net
Fri Nov 4 21:41:40 PDT 2011
Dear All,
I'm trying to add a command line option to Clang/Clang++.I want to let clang do the actions coresponding to the new command option.
What I have done is that I have modified the driver of Clang, including the "Dirver.cpp" ,"options.td", "Tools.cpp" and "Action.cpp".
But the compilation instance( namely Clang cc1) of Clang cannot identify the new option. And the console prints the ERROR:" unsupported argumnet". Perhaps, I should modified the Clang cc1 to make it be albe to accept the new option. But I don't know how to deal with the "Clang cc1".
what's more, when I have add the new command line argumnet to the "CC1Options.td", the console prints the "ast infomation"(in my opinion) of the source File. I have no idea about the reason.
Thanks in advance.
----Redder.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111105/de9b22d8/attachment.html>
More information about the cfe-dev
mailing list