File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -262,10 +262,11 @@ SPIRVToLLVMDbgTran::transTypeArrayOpenCL(const SPIRVExtInst *DebugInst) {
262
262
UpperBound, nullptr ));
263
263
continue ;
264
264
}
265
- if (auto *ExprUB = getDbgInst<SPIRVDebug::Expression>(Ops[I])) {
265
+ if (const SPIRVExtInst * ExprUB, *ExprLB;
266
+ (ExprUB = getDbgInst<SPIRVDebug::Expression>(Ops[I])) &&
267
+ (ExprLB =
268
+ getDbgInst<SPIRVDebug::Expression>(Ops[Ops.size () / 2 + I]))) {
266
269
auto *UpperBound = transDebugInst<DIExpression>(ExprUB);
267
- auto *ExprLB =
268
- getDbgInst<SPIRVDebug::Expression>(Ops[Ops.size () / 2 + I]);
269
270
auto *LowerBound = transDebugInst<DIExpression>(ExprLB);
270
271
Subscripts.push_back (Builder.getOrCreateSubrange (nullptr , LowerBound,
271
272
UpperBound, nullptr ));
You can’t perform that action at this time.
0 commit comments