diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-09-21 17:29:34 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-09-21 17:29:34 -0700 |
| commit | 81b5df347a2b92566dc679fdd4e110812dfe27d0 (patch) | |
| tree | 2e2580b944374f490797ef3211eb752c7b1bc051 /src/codegen/llvm.zig | |
| parent | edfada4317760a152ad9c36b39f5a2e68eeaebf8 (diff) | |
| download | zig-81b5df347a2b92566dc679fdd4e110812dfe27d0.tar.gz zig-81b5df347a2b92566dc679fdd4e110812dfe27d0.zip | |
compiler: fix structFieldName crash for tuples
When struct types have no field names, the names are implicitly
understood to be strings corresponding to the field indexes in
declaration order. It used to be the case that a NullTerminatedString
would be stored for each field in this case, however, now, callers must
handle the possibility that there are no names stored at all. This
commit introduces `legacyStructFieldName`, a function to fake the
previous behavior. Probably something better could be done by reworking
all the callsites of this function.
Diffstat (limited to 'src/codegen/llvm.zig')
0 files changed, 0 insertions, 0 deletions
