diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
commit | f73363f1dd94996356cefbf24388f561891acf0b (patch) | |
tree | e3c31248bdb36eaec5fd833490d4278162dba2a0 /source/Expression/IRInterpreter.cpp | |
parent | 160ee69dd7ae18978f4068116777639ea98dc951 (diff) |
Notes
Diffstat (limited to 'source/Expression/IRInterpreter.cpp')
-rw-r--r-- | source/Expression/IRInterpreter.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/source/Expression/IRInterpreter.cpp b/source/Expression/IRInterpreter.cpp index a809bff20039..abf86b739f07 100644 --- a/source/Expression/IRInterpreter.cpp +++ b/source/Expression/IRInterpreter.cpp @@ -154,16 +154,10 @@ public: switch (type_size) { case 1: - scalar = (uint8_t)u64value; - break; case 2: - scalar = (uint16_t)u64value; - break; case 4: - scalar = (uint32_t)u64value; - break; case 8: - scalar = (uint64_t)u64value; + scalar = llvm::APInt(type_size*8, u64value); break; default: return false; @@ -1567,8 +1561,8 @@ bool IRInterpreter::Interpret(llvm::Module &module, llvm::Function &function, return false; } - // Push all function arguments to the argument list that will - // be passed to the call function thread plan + // Push all function arguments to the argument list that will be passed + // to the call function thread plan for (int i = 0; i < numArgs; i++) { // Get details of this argument llvm::Value *arg_op = call_inst->getArgOperand(i); |