Skip to content

Commit a96b581

Browse files
committed
Adding an assert
1 parent c887adc commit a96b581

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/slang/slang-ir.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -4622,7 +4622,10 @@ void addGlobalValue(IRBuilder* builder, IRInst* value)
46224622
// have dependency to the earlier siblings.
46234623
//
46244624
if (value->parent)
4625+
{
4626+
SLANG_ASSERT(getIROpInfo(value->getOp()).isHoistable());
46254627
return;
4628+
}
46264629

46274630
// Try to find a suitable parent for the
46284631
// global value we are emitting.

0 commit comments

Comments
 (0)