diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-10-15 21:28:42 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2024-10-20 09:21:17 +0200 |
| commit | ef72b91ac2b96ba64a53b08a661e9ad83a828ee4 (patch) | |
| tree | 03d0c78049441a867629d0534a98face6703e578 /src/Type.zig | |
| parent | d2f04e919c833288d5cf1efa97c25bbaae101168 (diff) | |
| download | zig-ef72b91ac2b96ba64a53b08a661e9ad83a828ee4.tar.gz zig-ef72b91ac2b96ba64a53b08a661e9ad83a828ee4.zip | |
compiler: Remove uses of defaultFunctionAlignment() in the frontend.
minFunctionAlignment() is something we can know ahead of time for any given
target because it's a matter of ABI. However, defaultFunctionAlignment() is a
matter of optimization and every backend can do it differently depending on any
number of factors. For example, LLVM will base the choice on the CPU model in
its aarch64 backend. So just don't use this value in the frontend.
Diffstat (limited to 'src/Type.zig')
| -rw-r--r-- | src/Type.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Type.zig b/src/Type.zig index c6feb9ddd4..582e997ac7 100644 --- a/src/Type.zig +++ b/src/Type.zig @@ -1020,7 +1020,7 @@ pub fn abiAlignmentInner( }, // represents machine code; not a pointer - .func_type => return .{ .scalar = target_util.defaultFunctionAlignment(target) }, + .func_type => return .{ .scalar = target_util.minFunctionAlignment(target) }, .simple_type => |t| switch (t) { .bool, |
