From be503447b37c9a9f28a1fda7014e92ed536d55e7 Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Mon, 9 Mar 2015 01:02:24 +0100 Subject: [PATCH] Fix bug in codegen for functions with multiple parameters. Prior to this, all mutable param variables would be bound to the same parameter. --- BitcodeEmitter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/BitcodeEmitter.cpp b/BitcodeEmitter.cpp index 05de25a..05e7974 100644 --- a/BitcodeEmitter.cpp +++ b/BitcodeEmitter.cpp @@ -564,6 +564,7 @@ bool BitcodeEmitter::emit(Function const& node) { ); d->builder.CreateStore(argToAlloc, alloc); d->scope.push(arg.getName().getValue(), alloc); + ++argToAlloc; } for (Statement const& stat: node.getBody()) {