[PATCH] D125655: [HLSL] add -P option for dxc mode.

Xiang Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun May 15 20:02:03 PDT 2022


python3kgae created this revision.
python3kgae added reviewers: amccarth, craig.topper, hans, rnk, stefan_reinalter, beanz, pow2clk.
Herald added subscribers: Anastasia, StephenFan.
Herald added a project: All.
python3kgae requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added a project: clang.

A new option -P is added for dxc mode.
The format is -P proprecossed_file_name
It will make compile preprocess only and output to proprecossed_file_name.

Internally it will be translated into -E -o proprecossed_file_name.

When -P exists, other output compile option like -Fo will be ignored because compiler will run preprocess only.
A warning will be report if this happened.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125655

Files:
  clang/include/clang/Basic/DiagnosticDriverKinds.td
  clang/include/clang/Driver/Options.td
  clang/lib/Driver/Driver.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Driver/ToolChains/HLSL.cpp
  clang/test/Driver/dxc_P.hlsl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125655.429598.patch
Type: text/x-patch
Size: 4437 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220516/3d24df68/attachment.bin>


More information about the cfe-commits mailing list