Andrew Kelley
4d10fbef10
windows_com: add missing __CRT_UUID_DECL() for IEnumSetupInstances
...
This is intended to fix this error:
lld-link: error: undefined symbol: _GUID const& __mingw_uuidof<IEnumSetupInstances>()
>>> referenced by D:\a\1\s\src\windows_com.hpp:898
>>> D:\a\1\s\zig-cache\o\a5030d467932f0ce2f6511feb7d6af12\windows_sdk.obj:(__IEnumSetupInstances_IID_getter())
Thank you to Martin Storsjö for suggesting the fix.
2022-07-09 14:04:38 -07:00
Andrew Kelley
6a3a0fe7ae
Merge remote-tracking branch 'origin/master' into llvm14
2022-07-07 18:25:01 -07:00
Andrew Kelley
3a03872af7
LLVM: more robust implementation of C ABI for multiple_llvm_ints
...
The previous code here was potentially more optimal for some cases,
however, I never tested the perf, so it might not actually matter. This
code handles more cases. We can go back and re-evaluate that other
implementation if it seems worthwhile in the future.
2022-07-07 18:24:34 -07:00
Andrew Kelley
8d6011361f
LLVM: handle byref combined with multiple_llvm_ints
2022-07-07 18:24:34 -07:00
Cody Tapscott
cbc85f4516
stage1: Fix seg-fault when slicing string literal with sentinel
2022-07-08 02:14:38 +03:00
VÖRÖSKŐI András
75c33ba85e
Sema: add a note about @setEvalBranchQuota() when branch quota is exceeded
...
closes #11996
2022-07-08 02:13:33 +03:00
Andrew Kelley
8e07b0c4b9
Merge remote-tracking branch 'origin/master' into llvm14
2022-07-07 14:01:54 -07:00
Andrew Kelley
e0b9200492
llvm c++ wrapper: fix argument index calculations
2022-07-07 13:56:46 -07:00
Andrew Kelley
0c78ece1c9
Merge pull request #12016 from Vexu/stage2-compile-errors
...
Stage2 compile error improvements
2022-07-07 14:52:28 -04:00
emma
81bbefe9b8
AstGen: fix catch payoad not checking for shadowing
2022-07-07 21:38:32 +03:00
Veikka Tuominen
5007f727e5
stage2: move C pointer allowzero error to AstGen
2022-07-07 10:50:06 +03:00
Veikka Tuominen
b5ac2b4330
Sema: improve array source location
2022-07-07 10:50:06 +03:00
Veikka Tuominen
27ee414159
Sema: improve slice source locations
2022-07-07 10:50:06 +03:00
Veikka Tuominen
2ca752ea1a
Module: add .node_offset_un_op
2022-07-07 10:50:06 +03:00
Veikka Tuominen
89cef9f5f7
stage2: make line field of @src runtime known
2022-07-07 10:50:06 +03:00
Veikka Tuominen
226994cd7e
Sema: misc error message fixes
2022-07-07 10:50:06 +03:00
Veikka Tuominen
c07c2d68c7
Sema: more runtime indexing comptime value checks
2022-07-07 10:50:06 +03:00
Veikka Tuominen
1569b9c165
Sema: validate pointer types
2022-07-07 10:50:05 +03:00
Veikka Tuominen
299836dbd9
Sema: panic at comptime + misc error message improvements
2022-07-07 10:50:05 +03:00
Veikka Tuominen
252388eb28
AstGen: move error_to_int, int_to_error and select to extended
2022-07-07 10:45:45 +03:00
Andrew Kelley
e5549de0de
Merge remote-tracking branch 'origin/master' into llvm14
2022-07-07 00:06:11 -07:00
Riccardo Binetti
0101a5f75e
Sema: accept thumb and thumbeb with ARM calling conventions
...
Commit 3014a0d5f1dcbcfdcec3852ffd54f3c589fe3e83 added calling convention
validation, but left out thumb and thumbeb from the archs that can use the
ARM-specific calling conventions. This plus
a8a7f15106abef7c647d4de572a04b77ce048dd6 made compilation fail for thumb
targets.
2022-07-06 21:02:30 -04:00
Andrew Kelley
1b610d7853
Merge remote-tracking branch 'origin/master' into llvm14
2022-07-06 17:55:05 -07:00
Andrew Kelley
f3069f51aa
Sema: fix type resolution during generic function instantiation
...
Found when trying to compile the std lib tests for x86_64-macos.
2022-07-06 17:00:17 -07:00
Andrew Kelley
9a5c7b4b4d
Merge remote-tracking branch 'origin/master' into llvm14
2022-07-05 16:24:18 -07:00
Andrew Kelley
fc7c0e07be
stage2: propagate use_stage1 to sub-compilation
...
This makes it so that -fno-stage1 also affects compiler-rt for example.
2022-07-05 15:45:48 -07:00
Andrew Kelley
2ee864ca5e
CLI: add support for -fno-builtin
2022-07-05 15:21:20 -07:00
Cody Tapscott
86570b3e2c
stage2: Fix corrupted Type when de-referencing field pointer
2022-07-05 15:02:13 -04:00
Andrew Kelley
fbd6c88321
Merge remote-tracking branch 'origin/master' into llvm14
2022-07-04 17:22:36 -07:00
Andrew Kelley
6fc9f6c5f6
link.Coff: notice special windows symbols
...
in order to have a better default for subsystem. This brings stage2
behavior on par with stage1.
2022-07-04 17:20:01 -07:00
Andrew Kelley
9ecc47cd7c
Sema: fix intFitsInType implementation
...
The function did not handle comptime_int in the case of lazy_align or
lazy_size.
2022-07-04 16:52:34 -07:00
Andrew Kelley
eba8892b84
Sema: resolve lazy value before hashing it for generic fn
2022-07-04 16:44:41 -07:00
Andrew Kelley
ecb4293afe
stage2: disable unit tests when building with stage1
...
They trip LLVM assertions and spirv is not needed to bootstrap. Not
important for these tests to pass with stage1.
2022-07-04 16:20:33 -07:00
Andrew Kelley
f59bd2be53
Merge remote-tracking branch 'origin/master' into llvm14
2022-07-04 14:07:08 -07:00
Andrew Kelley
d65e248ed1
stage2: ELF: improve error reporting when libc is missing
...
Future improvement: make plain error notes actually render as notes
rather than errors, but keep them as errors for the case of
sub-compilation errors, e.g. when compiler-rt has compilation errors.
2022-07-04 14:06:20 -07:00
Veikka Tuominen
050fef3c23
translate-c: do not try to get rid of do while loop
...
It might contain breaks and continues.
Closes #11994
2022-07-04 21:56:54 +03:00
Andrew Kelley
6db190cf70
Merge remote-tracking branch 'origin/master' into llvm14
2022-07-03 22:27:21 -07:00
Andrew Kelley
fdc24e6608
stage1: fix vectors of small int and bool tripping LLVM assertion
...
stage2 already has this fixed; debug info is given size in bits rather
than ABI size (bytes) multiplied by 8.
closes #11587
2022-07-03 21:08:47 -07:00
Andrew Kelley
15bdba410a
update build scripts to LLD and LLVM 14 libraries
2022-07-03 18:41:43 -07:00
Andrew Kelley
b698168664
stage2: update vector alignment logic
...
This follows LLVM14's lead on vector alignment, which computes byte
count based on the length premultiplied by bits.
This commit also disables behavior tests regressed by LLVM 14, only for
stage1. stage2 fortunately does not trip the regression.
2022-07-03 13:33:09 -07:00
Andrew Kelley
15f111a085
LLVM: update lowering of saturating shift-left
...
LLVM 14 makes it so that a RHS of saturating shift left produces a
poison value if the value is greater than the number of bits of the LHS.
Zig now emits code that will check if this is the case and select a
saturated LHS value in such case, matching Zig semantics.
2022-07-03 13:07:23 -07:00
Andrew Kelley
b1873f2074
LLVM: update inline asm to LLVM14 semantics
...
This is the equivalent of d19290e603833a197bc8bfc8315561ec77291225
applied to stage2 instead of stage1.
2022-07-03 11:37:31 -07:00
Jakub Konka
5735ce39ae
clang: parse --verbose flag as -v
2022-07-03 09:43:01 +02:00
Andrew Kelley
fcf77e06ea
libcxx: add additional include directory
...
It appears that libcxx files now want to additionally include based
from the src/ directory.
2022-07-02 20:41:47 -07:00
Andrew Kelley
c8a00c4b02
update clang command line options to LLVM 14
2022-07-01 22:36:51 -07:00
Andrew Kelley
3ab5912eee
LLD: the driver functions now return "false" to mean "error"
2022-07-01 22:13:30 -07:00
Andrew Kelley
d19290e603
stage1: update inline asm outputs to LLVM 14
...
LLVM pointers are transitioning to no longer have types, however, inline
assembly inputs and outputs which accept pointers need to know the
element type. So, inline assembly must be upgraded to add
elementtype(<ty>) annotations.
2022-07-01 20:11:06 -07:00
Andrew Kelley
1fa4a58d2c
stage1: update to LLVM 14 API
2022-07-01 19:19:13 -07:00
Andrew Kelley
bd680139d0
update libcxx to llvm 14.0.6
2022-07-01 16:31:47 -07:00
Andrew Kelley
c89dd15e1b
Merge remote-tracking branch 'origin/master' into llvm14
2022-07-01 15:52:54 -07:00