rnk added a subscriber: zequanwu.
rnk added a comment.

I think the flag was originally intended to be an internal -cc1 flag not 
exposed to users. You should be able to work around your problem with `-Xclang 
-fno-pch-instantiate-templates`, btw.

----

@zequanwu, can you patch this in locally and take over this patch? Please 
address the hasFlag comment above, add a test to clang/test/Driver, and make 
sure the flag works with `--driver-mode=gcc` and `--driver-mode=cl`. Follow the 
examples of the other tests, run clang with `-###`, and make sure this flag 
does or does not appear on the `-cc1` line.



================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1217
+      // precomp using /Yc
+      if (!Args.hasArg(options::OPT_fno_pch_instantiate_templates))
+        CmdArgs.push_back(Args.MakeArgString("-fpch-instantiate-templates"));
----------------
This should probably be `hasFlag(fpch_ins..., fno_pch_inst..., true)` so that 
`-fno-pch-inst -fpch-inst...` works.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88680/new/

https://reviews.llvm.org/D88680

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to