[clang] [Clang] diagnosing missing Vulkan environment when using SPIR-V triple (PR #190840)
Tony Guillot via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 14 04:16:20 PDT 2026
================
@@ -341,19 +343,24 @@ class LLVM_LIBRARY_VISIBILITY SPIRVTargetInfo : public BaseSPIRVTargetInfo {
: BaseSPIRVTargetInfo(Triple, Opts) {
assert(Triple.getArch() == llvm::Triple::spirv &&
"Invalid architecture for Logical SPIR-V.");
- assert(Triple.getOS() == llvm::Triple::Vulkan &&
- Triple.getVulkanVersion() != llvm::VersionTuple(0) &&
- "Logical SPIR-V requires a valid Vulkan environment.");
- assert(Triple.getEnvironment() >= llvm::Triple::Pixel &&
- Triple.getEnvironment() <= llvm::Triple::Amplification &&
- "Logical SPIR-V environment must be a valid shader stage.");
----------------
to268 wrote:
If you need to remove this assert here, move it before the `return true;` statement of the `validateTarget()` method.
https://github.com/llvm/llvm-project/pull/190840
More information about the cfe-commits
mailing list