aboutsummaryrefslogtreecommitdiff
path: root/src/stage1/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-12-01 16:24:44 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-12-01 16:24:44 -0700
commit1912ec0323af9a9077a8706157beb8207f6e3eb9 (patch)
tree7e94761acb4c3b773ee0d9ae0d0206f7417b3204 /src/stage1/codegen.cpp
parent0714832c21169493a0a857237fbface612e3d5e0 (diff)
downloadzig-1912ec0323af9a9077a8706157beb8207f6e3eb9.tar.gz
zig-1912ec0323af9a9077a8706157beb8207f6e3eb9.zip
AstGen: use null string to communicate non-string-literal asm
dd62a6d2e8de522187fd096354e7156cca1821c5 short-circuited the logic of `asmExpr` by emitting ZIR for `@compileError("...")`. This caused false positive "unreachable code" errors for stage1 when there was an expression in the asm template. This commit makes such cases instead go through logic of `asmExpr` like normal, however the asm template is set to 0. This is then picked up in Sema (part of stage2, not stage1) and reported as "assembly code must use string literal syntax".
Diffstat (limited to 'src/stage1/codegen.cpp')
0 files changed, 0 insertions, 0 deletions