Skip to content

Commit 950e141

Browse files
mateuszchudykigcbot
authored andcommitted
PromoteBools pass - check if called function is not nullptr
PromoteBools pass - check if called function is not nullptr.
1 parent 03ba8da commit 950e141

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

IGC/AdaptorOCL/preprocess_spvir/PromoteBools.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ void PromoteBools::visitStoreInst(StoreInst& store)
124124
void PromoteBools::visitCallInst(CallInst& call)
125125
{
126126
auto function = call.getCalledFunction();
127+
if (!function)
128+
{
129+
return;
130+
}
131+
127132
auto functionType = call.getFunctionType();
128133

129134
auto promotedValue = getOrCreatePromotedValue(function);

0 commit comments

Comments
 (0)