diff options
| author | gingerBill <bill@gingerbill.org> | 2023-04-20 12:18:13 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-04-20 12:18:13 +0100 |
| commit | 685f7d0feae7b7bbfee5b24f6e6dc6751366d36e (patch) | |
| tree | 782c0fd8133e9227d53ad72189d200a62598b05b /src/llvm_abi.cpp | |
| parent | f5d9ca64f95ab47b6c2809275755ebca260c9448 (diff) | |
Rename `word_size` to `ptr_size` internally to make it clearer
Diffstat (limited to 'src/llvm_abi.cpp')
| -rw-r--r-- | src/llvm_abi.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/llvm_abi.cpp b/src/llvm_abi.cpp index 3fc68644d..6308d7bbf 100644 --- a/src/llvm_abi.cpp +++ b/src/llvm_abi.cpp @@ -218,7 +218,7 @@ gb_internal i64 lb_sizeof(LLVMTypeRef type) { case LLVMDoubleTypeKind: return 8; case LLVMPointerTypeKind: - return build_context.word_size; + return build_context.ptr_size; case LLVMStructTypeKind: { unsigned field_count = LLVMCountStructElementTypes(type); @@ -275,7 +275,7 @@ gb_internal i64 lb_alignof(LLVMTypeRef type) { case LLVMIntegerTypeKind: { unsigned w = LLVMGetIntTypeWidth(type); - return gb_clamp((w + 7)/8, 1, build_context.word_size); + return gb_clamp((w + 7)/8, 1, build_context.ptr_size); } case LLVMHalfTypeKind: return 2; @@ -284,7 +284,7 @@ gb_internal i64 lb_alignof(LLVMTypeRef type) { case LLVMDoubleTypeKind: return 8; case LLVMPointerTypeKind: - return build_context.word_size; + return build_context.ptr_size; case LLVMStructTypeKind: { if (LLVMIsPackedStruct(type)) { @@ -388,7 +388,7 @@ namespace lbAbi386 { } if (build_context.metrics.os == TargetOs_windows && - build_context.word_size == 8 && + build_context.ptr_size == 8 && lb_is_type_kind(type, LLVMIntegerTypeKind) && type == LLVMIntTypeInContext(c, 128)) { // NOTE(bill): Because Windows AMD64 is weird |