================
@@ -31,6 +31,16 @@ option:
 
   $ clang -cc1 -include-pch test.h.pch test.c -o test.s
 
+To ignore PCH options using ``clang -cc1``, use the option `-ignore-pch`:
----------------
mizvekov wrote:

That's not true, what happens is that some times, such as in this case, we have 
flags in both the driver and frontend with the same spelling and functionality, 
but this should be treated as coincidence, and not relied upon.

You can test yourself that `clang -include-pch` is recognized by the driver, 
the `-cc1` switch is not required.
Only the driver option is documented in the User Manual.

Following the logic of what I said earlier, upon encountering `-ignore-pch` in 
the driver, you would just not forward any plain `-include-pch` from the driver 
into the frontend, but this switch should have no effect upon encountering 
`-Xclang -include-pch`.

Though I am not sure we need this `-ignore-pch` option in the GCC driver, 
presumably we only have a need for it in the MSVC driver.

https://github.com/llvm/llvm-project/pull/142409
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to