Skip to content

Commit 8823f63

Browse files
committed
[HLSL] Add assert to verify the resource binding attr exists
1 parent 7b3745e commit 8823f63

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang/lib/CodeGen/CGHLSLRuntime.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ static void createResourceCtorArgs(CodeGenModule &CGM, CXXConstructorDecl *CD,
180180

181181
} else {
182182
// implicit binding
183+
assert(RBA && "missing implicit binding attribute");
183184
auto *OrderID =
184185
llvm::ConstantInt::get(CGM.IntTy, RBA->getImplicitBindingOrderID());
185186
Args.add(RValue::get(Space), AST.UnsignedIntTy);

0 commit comments

Comments
 (0)