aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-05-20 23:52:01 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-05-21 00:09:30 -0700
commitf31f86a86a482267a524cdca59fb2b940ecadf25 (patch)
tree8b23b571343ad7c89d5731f37a981c0ad2b91380 /src/Compilation.zig
parent1697a6f0443ca8896081f98bd8648bc7bdb2cc58 (diff)
downloadzig-f31f86a86a482267a524cdca59fb2b940ecadf25.tar.gz
zig-f31f86a86a482267a524cdca59fb2b940ecadf25.zip
LLVM: fix calling convention lowering involving pointers
The previous commit caused LLVM module verification failure because we attemped to bitcast LLVM pointers to i64 parameters. This is exactly what we want, however it's technically not allowed according to LLVM's type system. It could have been fixed trivially by using ptrtoint instead of bitcast in the case of pointers, however, out of concern for inttoptr being problematic for the optimizer, I put in special code to detect when a given parameter can be treated as its actual type rather than an integer type. This makes Zig's output LLVM IR closer to what Clang outputs.
Diffstat (limited to 'src/Compilation.zig')
0 files changed, 0 insertions, 0 deletions