diff options
| author | gingerBill <bill@gingerbill.org> | 2021-12-28 14:05:18 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-12-28 14:05:18 +0000 |
| commit | 5d653a9d8eee496089522e9f74986b808a123938 (patch) | |
| tree | 660d2405bed22bad6c34b19cef623023a3ab24bd /src/llvm_abi.cpp | |
| parent | 7f61a90ea1be96c22cae87fdbfdc08b30f2421d6 (diff) | |
| parent | 6f370fdbf2811a82b09a8fe9afcd805cdf3477eb (diff) | |
Merge branch 'master' of https://github.com/odin-lang/Odin
Diffstat (limited to 'src/llvm_abi.cpp')
| -rw-r--r-- | src/llvm_abi.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/llvm_abi.cpp b/src/llvm_abi.cpp index e18dc344b..c30f6531a 100644 --- a/src/llvm_abi.cpp +++ b/src/llvm_abi.cpp @@ -981,16 +981,16 @@ namespace lbAbiArm64 { if (size <= 16) { LLVMTypeRef cast_type = nullptr; if (size <= 1) { - cast_type = LLVMIntTypeInContext(c, 8); + cast_type = LLVMInt8TypeInContext(c); } else if (size <= 2) { - cast_type = LLVMIntTypeInContext(c, 16); + cast_type = LLVMInt16TypeInContext(c); } else if (size <= 4) { - cast_type = LLVMIntTypeInContext(c, 32); + cast_type = LLVMInt32TypeInContext(c); } else if (size <= 8) { - cast_type = LLVMIntTypeInContext(c, 64); + cast_type = LLVMInt64TypeInContext(c); } else { unsigned count = cast(unsigned)((size+7)/8); - cast_type = LLVMArrayType(LLVMIntTypeInContext(c, 64), count); + cast_type = LLVMArrayType(LLVMInt64TypeInContext(c), count); } return lb_arg_type_direct(type, cast_type, nullptr, nullptr); } else { @@ -999,7 +999,7 @@ namespace lbAbiArm64 { } } } - + Array<lbArgType> compute_arg_types(LLVMContextRef c, LLVMTypeRef *arg_types, unsigned arg_count) { auto args = array_make<lbArgType>(heap_allocator(), arg_count); |