diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/StringLowering.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/passes/StringLowering.cpp b/src/passes/StringLowering.cpp index 85e75f705..d92a151c7 100644 --- a/src/passes/StringLowering.cpp +++ b/src/passes/StringLowering.cpp @@ -456,6 +456,16 @@ struct StringLowering : public StringGathering { } } + void visitCall(Call* curr) { + auto targetSig = + getModule()->getFunction(curr->target)->type.getSignature(); + for (Index i = 0; i < curr->operands.size(); i++) { + if (isExt(targetSig.params[i])) { + ensureNullIsExt(curr->operands[i]); + } + } + } + void visitStructNew(StructNew* curr) { if (curr->type == Type::unreachable || curr->operands.empty()) { return; |