Commit acb18174 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #19 from asuhan/many_args_ir_fix

Many args ir fix
parents 86cf021d ae2949a7
...@@ -340,7 +340,7 @@ static ConcreteCompilerVariable* _call(IREmitter &emitter, llvm::Value* func, vo ...@@ -340,7 +340,7 @@ static ConcreteCompilerVariable* _call(IREmitter &emitter, llvm::Value* func, vo
// Don't use the IRBuilder since we want to specifically put this in the entry block so it only gets called once. // Don't use the IRBuilder since we want to specifically put this in the entry block so it only gets called once.
// TODO we could take this further and use the same alloca for all function calls? // TODO we could take this further and use the same alloca for all function calls?
llvm::Instruction* insertion_point = emitter.currentFunction()->func->getEntryBlock().getTerminator(); llvm::Instruction* insertion_point = emitter.currentFunction()->func->getEntryBlock().getFirstInsertionPt();
arg_array = new llvm::AllocaInst(g.llvm_value_type_ptr, n_varargs, "arg_scratch", insertion_point); arg_array = new llvm::AllocaInst(g.llvm_value_type_ptr, n_varargs, "arg_scratch", insertion_point);
} }
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
// limitations under the License. // limitations under the License.
#include <dlfcn.h> #include <dlfcn.h>
#include <stdarg.h>
#include <string.h> #include <string.h>
#include "core/types.h" #include "core/types.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment