[PATCH] D159103: [Driver][HLSL] Improve diagnostics for invalid shader model and stage

Justin Bogner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 29 08:11:54 PDT 2023


bogner created this revision.
bogner added reviewers: aaron.ballman, beanz.
Herald added subscribers: Anastasia, mcrosier.
Herald added a project: All.
bogner requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D159103

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159103.554348.patch
Type: text/x-patch
Size: 8427 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230829/9f45ae09/attachment.bin>


More information about the cfe-commits mailing list