[all-commits] [llvm/llvm-project] 8a27a2: [HLSL] Support -E option for HLSL.

Xiang Li via All-commits all-commits at lists.llvm.org
Thu Aug 4 16:54:35 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8a27a2f89f83c55d352c001b3b308c35900cbdfc
      https://github.com/llvm/llvm-project/commit/8a27a2f89f83c55d352c001b3b308c35900cbdfc
  Author: Xiang Li <python3kgae at outlook.com>
  Date:   2022-08-04 (Thu, 04 Aug 2022)

  Changed paths:
    M clang/include/clang/Basic/Attr.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Basic/TargetOptions.h
    M clang/include/clang/Driver/Options.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Driver/ToolChains/HLSL.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    A clang/test/Driver/dxc_E.hlsl
    A clang/test/Driver/hlsl-entry.cpp
    A clang/test/SemaHLSL/entry.hlsl
    M clang/test/SemaHLSL/prohibit_pointer.hlsl
    M clang/test/SemaHLSL/shader_type_attr.hlsl

  Log Message:
  -----------
  [HLSL] Support -E option for HLSL.

-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.

Reviewed By: beanz

Differential Revision: https://reviews.llvm.org/D124751




More information about the All-commits mailing list