[PATCH] D128409: [clang-cl] Add -emit-ast to clang-cl driver

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 23 04:08:17 PDT 2022

hans added a comment.

I'm unfamiliar with -emit-ast. Can you add some background on what this is for? What's CTU?

In any case this needs a test.

Comment at: clang/include/clang/Driver/Options.td:834
 def Xoffload_linker : JoinedAndSeparate<["-"], "Xoffload-linker">,
-  HelpText<"Pass <arg> to the offload linkers or the ones idenfied by -<triple>">, 
+  HelpText<"Pass <arg> to the offload linkers or the ones idenfied by -<triple>">,
   MetaVarName<"<triple> <arg>">, Group<Link_Group>;
thieta wrote:
> Whops. My editor strikes again and removes a trailing space. Let me know if I should edit this out of this commit.
Yes please. (Or land it separately.)

Comment at: clang/lib/Driver/Driver.cpp:5629
+  if ((JA.getType() == types::TY_Object || JA.getType() == types::TY_LTO_BC ||
+       JA.getType() == types::TY_AST || JA.getType() == types::TY_Plist) &&
       C.getArgs().hasArg(options::OPT__SLASH_Fo, options::OPT__SLASH_o)) {
thieta wrote:
> I do wonder if this limitation here is really wanted. It makes clang-cl behave a bit different from clang/clang++. I can also split this part out in it's own commit if we feel like it's necessary.
What limitation are you referring to?

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list