Fix building when SPIRV is disabled#8408
Merged
damyanp merged 2 commits intomicrosoft:mainfrom Apr 27, 2026
Merged
Conversation
Fixes build break introduced by ec9d97a (microsoft#8365), which referenced hlsl::GetVKBufferPointerAlignment and m_vkBufferPointerTemplateDecl unconditionally. Co-authored-by: Copilot <[email protected]>
Contributor
You can test this locally with the following command:git-clang-format --diff ec9d97a98b083c757b2832da50984e72f4189f3b 5c6417ad9cf60ce46d8144c792e7d91a93f3914c -- tools/clang/lib/Sema/SemaHLSL.cppView the diff from clang-format here.diff --git a/tools/clang/lib/Sema/SemaHLSL.cpp b/tools/clang/lib/Sema/SemaHLSL.cpp
index e953758b..7df68f5a 100644
--- a/tools/clang/lib/Sema/SemaHLSL.cpp
+++ b/tools/clang/lib/Sema/SemaHLSL.cpp
@@ -7484,7 +7484,8 @@ bool HLSLExternalSource::MatchArguments(
TemplateName(m_vkBufferPointerTemplateDecl), TemplateArgs, 2,
m_context->getTypeDeclType(Spec));
#else
- // The IOP_Vk* opcodes are only reachable when ENABLE_SPIRV_CODEGEN is defined.
+ // The IOP_Vk* opcodes are only reachable when ENABLE_SPIRV_CODEGEN is
+ // defined.
llvm_unreachable("vk:: pointer cast intrinsics require SPIR-V codegen");
#endif // ENABLE_SPIRV_CODEGEN
} else {
|
s-perron
approved these changes
Apr 27, 2026
V-FEXrt
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes build break introduced by ec9d97a (#8365), which referenced hlsl::GetVKBufferPointerAlignment and m_vkBufferPointerTemplateDecl unconditionally.