Skip to content

Commit cff010d

Browse files
[NFC] Add a safety assert to BuiltinCallMutator. (#1748)
1 parent a3fc26f commit cff010d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/SPIRV/SPIRVBuiltinHelper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ BuiltinCallMutator BuiltinCallHelper::mutateCallInst(CallInst *CI,
208208

209209
BuiltinCallMutator BuiltinCallHelper::mutateCallInst(CallInst *CI,
210210
std::string FuncName) {
211+
assert(CI->getCalledFunction() && "Can only mutate direct function calls.");
211212
return BuiltinCallMutator(CI, std::move(FuncName), Rules, NameMapFn);
212213
}
213214

0 commit comments

Comments
 (0)