[all-commits] [llvm/llvm-project] e50419: [Driver][HLSL] Improve diagnostics for invalid sha...

Justin Bogner via All-commits all-commits at lists.llvm.org
Wed Sep 13 11:14:17 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e504194d51e1f0f7ca5b684b4aa99db4940856c2
      https://github.com/llvm/llvm-project/commit/e504194d51e1f0f7ca5b684b4aa99db4940856c2
  Author: Justin Bogner <mail at justinbogner.com>
  Date:   2023-09-13 (Wed, 13 Sep 2023)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticDriverKinds.td
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Sema/SemaDecl.cpp
    A clang/test/Driver/hlsl-lang-targets-spirv.hlsl
    M clang/test/Driver/hlsl-lang-targets.hlsl
    M llvm/include/llvm/TargetParser/Triple.h

  Log Message:
  -----------
  [Driver][HLSL] Improve diagnostics for invalid shader model and stage

This adds more validation that a dxil triple is actually useable when
compiling HLSL.

The OS field of the triple needs to be a versioned shader model.
Later, we should set a default if this is empty and check that the
version is a shader model we can actually handle.

The Environment field of the triple needs to be specified and be a
valid shader stage. I'd like to allow this to be empty and treat it
like library, but allowing that currently crashes in DXIL metadata
handling.

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




More information about the All-commits mailing list