Martin Kinkelin
a001ff6bd5
Introduce getOpaquePtrType() helper
2024-07-18 22:07:13 +02:00
Martin Kinkelin
4818101c3e
Get rid of some superfluous GEPs with (0, 0) indices
2024-05-20 17:30:02 +02:00
Martin Kinkelin
4c74f64a9c
Get rid of D type param in DtoConstSlice()
2024-05-20 17:30:01 +02:00
Martin Kinkelin
d140f2a283
Skip superfluous IR pointer bitcasts, now that they are always opaque
2024-05-20 16:45:09 +02:00
Martin Kinkelin
3067b7b115
Enforce opaque IR pointers
2024-05-12 18:47:13 +02:00
Martin Kinkelin
e7091dd0c7
Drop support for LLVM < 14
...
LLVM 14 is the first version supporting both new pass manager and
opaque IR pointers.
2024-05-12 03:53:03 +02:00
liushuyu
fc4d884d2d
Multiple changes ...
...
* Use getVoidPtrType helper
* Replace #define with constexpr
2024-03-26 14:48:36 -06:00
Martin Kinkelin
8dd1957c34
Adapt to object.TypeInfo_Class layout change
...
Without populating the new `nameSig` field yet.
2024-03-04 00:14:28 +01:00
Martin Kinkelin
bb2dec2f87
Adapt to free arrayOf(Type*) function
2024-03-03 22:12:16 +01:00
Johan Engelen
91d306894e
Add support for LLVM 17. ( #4533 )
2023-12-03 19:07:31 +01:00
Martin Kinkelin
16b3c7e49a
ImportC: Fix static
linkage ( #4487 )
...
Fixes #4484 .
2023-09-04 11:18:20 +02:00
Martin Kinkelin
c8857e8cb8
Fix some LLVM 16 deprecations wrt. DataLayout::getABITypeAlignment() and llvm::makeArrayRef()
2023-08-13 19:10:57 +02:00
Martin Kinkelin
81ea49db13
Merge remote-tracking branch 'origin/master' into llvm16-2
2023-08-12 14:37:01 +02:00
Martin Kinkelin
5d3ded9eeb
Remove legacy LL[Maybe]Align
2023-07-29 02:09:35 +02:00
Martin Kinkelin
e4e36f5dc0
[little dcompute fixup for LLVM 16]
2023-07-10 12:27:22 +02:00
Martin Kinkelin
a80dd003cd
Handle lambda mangle collisions by emitting lambdas with internal linkage ( #4415 )
...
See https://issues.dlang.org/show_bug.cgi?id=23722 .
2023-06-08 00:39:38 +00:00
Johan Engelen
aa64fad44b
Fix deprecation warning ( #4403 )
...
We have a new codepath for LLVM >= 16, so the deprecation is solved.
2023-05-14 10:45:52 +00:00
Zachary Yedidia
8006b95b7e
Fix miscompilation when adding a 64-bit constant to a symbol ( #4283 )
...
Fixes #4264
2022-12-21 00:32:36 +01:00
Nicholas Wilson
906037988f
Move abi*.*
to abi/
( #4192 )
2022-09-21 13:16:04 +00:00
Nicholas Wilson
af51b700be
Rename DtoAggrPaint
to DtoSlicePaint
( #4174 )
...
It only does two elements and is exclusively used for slices
2022-09-15 20:44:28 +08:00
Nicholas Wilson
30e2d45f25
Remove getContainedType
from DtoMemCpy
( #4163 )
2022-09-14 09:28:36 +08:00
Nicholas Wilson
4c7a714b4b
Remove getContainedType
in DtoMemCpy
( #4162 )
2022-09-14 08:36:24 +08:00
Nicholas Wilson
3cfae312b7
Remove getContainedType
in tollvm.cpp
( #4159 )
2022-09-13 22:18:37 +08:00
Nicholas Wilson
838146be71
Remove getContainedType
from DtoMemSetZero
( #4157 )
2022-09-13 21:39:05 +08:00
Nicholas Wilson
6aa806f7df
Remove getContainedType
from DtoType
( #4147 )
2022-09-13 18:16:50 +08:00
Martin Kinkelin
65cab03bf0
Rename DtoGEP() type argument to pointeeTy
...
Incl. clang-format.
2022-09-10 20:32:36 +02:00
Martin Kinkelin
da1d654dd8
Fix build (adapt RISC-V stuff to recent Dto{GEP,Load} changes)
2022-09-10 20:30:04 +02:00
Nicholas Wilson
148e55feee
Remove usage of getPointerElementType
in stripAddrSpaces
( #4114 )
2022-09-06 14:39:48 +08:00
Nicholas Wilson
0829b40abe
Remove deprecated getPointeeType
and DtoLoad
( #4109 )
2022-09-04 11:39:21 +08:00
Nicholas Wilson
85bd909fca
Remove now unused deprecated wrappers ( #4104 )
2022-09-03 15:22:40 +08:00
Nicholas Wilson
a448110fd3
Use typed gep in tollvm.cpp
( #4085 )
2022-09-01 10:26:47 +08:00
Nicholas Wilson
4aba54ed52
Add typed overloads for GEP, mark old ones deprecated ( #4051 )
2022-08-28 12:32:41 +08:00
Nicholas Wilson
f142ac2e83
Add overloads of DtoLoad
to transition from getPointeeType
( #4043 )
2022-08-22 09:45:11 +08:00
Nicholas Wilson
aea2033c19
Remove getPointeeType
from DtoAlignedLoad ( #4025 )
2022-08-21 08:24:40 +08:00
Nicholas Wilson
764e2fb34e
[NFC] Push getPointeeType
up the stack in DtoGEP
( #4026 )
2022-08-20 06:25:53 +00:00
Nicholas Wilson
f0a3abf1dc
Remove getPointeeType
from DtoVolatileLoad ( #4024 )
2022-08-20 05:23:17 +00:00
Nicholas Wilson
844508d059
Push getPointeeType up the stack from DtoLoadImpl ( #4023 )
2022-08-20 11:19:40 +08:00
Martin Kinkelin
be20833b22
codegen: Support {Not,Logical,Identity,Cmp}Exp with non-bool type (for importC AST)
...
Fixing failing LDC assertions.
2022-04-30 23:46:47 +02:00
Martin Kinkelin
bdef01e7cc
Raise min LLVM version to 9.0
2022-04-25 23:11:48 +02:00
Martin Kinkelin
f2a6fefb7b
Merge pull request #3923 from kinke/fix3916
...
Fix #3916 - undefined symbols with `-dllimport=all` on Windows
2022-02-28 22:19:02 +01:00
Martin Kinkelin
7b6810b01b
Fix LLVM 13 deprecation messages during build
2022-02-26 19:15:46 +01:00
Martin Kinkelin
4bd8dcd91b
Adapt to new TOK and EXP enum classes
2022-02-16 20:52:07 +01:00
Martin Kinkelin
4fcbd692bb
Add @hidden UDA ( #3855 )
...
To hide a symbol in the sense of making it DSO-local. An `export`
visibility is stronger and overrides the UDA.
On non-Windows, also newly hide symbols (without `export`) with
linkonce_odr etc. linkage.
2021-10-23 17:50:18 +02:00
Martin Kinkelin
e8997308f9
Always specify a pointee type for llvm::ConstantExpr::getGetElementPtr()
...
As required by LLVM 13.
2021-10-11 19:21:37 +02:00
Martin Kinkelin
369cfd13ce
Adapt to TY enum class
2021-09-07 16:51:19 +02:00
Johan Engelen
70ecbc8b8d
Fix issue #3802 - Fix size_t size for 32bit ABI on 64bit architectures.
2021-08-07 23:50:13 +02:00
Martin Kinkelin
ee0d5fbe3c
Windows: Default to dllexport with -shared, and enforce dllimport with -link-defaultlib-shared
2021-05-03 20:54:57 +02:00
Martin Kinkelin
64a5b53566
Windows: Disable @weak emulation for dllexported functions
...
Otherwise the functions aren't exported. We have some @weak functions in
druntime.
2021-04-29 17:20:32 +02:00
Martin Kinkelin
fb709e9b5f
Windows: Only export all external and weak_odr symbols with -fvisibility=public
...
Mainly, don't export any linkonce_odr symbols.
2021-04-29 17:20:32 +02:00
Martin Kinkelin
c5afede4f3
Windows: Try to make implicit dllimport work for data symbols
...
Functions can and apparently are magically stubbed (something like
`void myFunc() { (*__imp_myFunc)(); }`), but it seems we cannot avoid
dllimport for global variables exported from other DLLs/executables.
In order to try to make druntime etc. work as DLL without explicitly
exporting all required globals, `-fvisibility=public` now also assumes
all `extern(D)` globals *not* defined in some root module are exported
from some binary and dllimports them accordingly.
So e.g. compiling Phobos with `-fvisibility=public` means
* Phobos exports all defined symbols,
* Phobos dllimports extern(D) druntime symbols, and
* extern(C) globals, e.g., from the C runtime, remain external and are
linked regularly.
2021-04-29 17:20:32 +02:00