[PATCH] D124751: Support -E option for HLSL.

Xiang Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun May 1 23:38:26 PDT 2022


python3kgae created this revision.
python3kgae added reviewers: beanz, steven_wu, JonChesterfield, sscalpone, pow2clk, rnk, bogner, MaskRay, dexonsmith.
Herald added subscribers: Anastasia, StephenFan.
Herald added a project: All.
python3kgae requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

-E option will set entry function for hlsl.
The format is -E entry_name.

To avoid conflict with existing option with name 'E', add an extra prefix '--'.

A new field HLSLEntry is added to TargetOption.
To share code with HLSLShaderAttr, entry function will be add HLSLShaderAttr attribute too.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124751

Files:
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Basic/TargetOptions.h
  clang/include/clang/Driver/Options.td
  clang/include/clang/Sema/Sema.h
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/test/SemaHLSL/entry.hlsl
  clang/test/SemaHLSL/prohibit_pointer.hlsl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124751.426339.patch
Type: text/x-patch
Size: 7496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220502/5cad7963/attachment-0001.bin>


More information about the cfe-commits mailing list