Commit graph

21 commits

Author SHA1 Message Date
Martin Kinkelin
9041c0bf67 Adapt to free functions in dmd C++ namespace now 2024-03-03 19:14:00 +01:00
Martin Kinkelin
d435c8a451 Merge fix: Adapt to changed mangleToBuffer() signature 2023-11-06 01:10:16 +01:00
Martin Kinkelin
95195fec71 Merge remote-tracking branch 'origin/master' into merge-2.105
Conflicts:
	runtime/druntime/src/__builtins.di
2023-09-01 16:21:57 +02:00
Martin Kinkelin
db9323d2aa
ImportC: Support weird asm("_" "<name>") mangling stuff (#4486)
These are apparently used in the Mac system headers...

Co-authored-by: Martin Kinkelin <kinke@gnx.net>
2023-09-01 16:20:41 +02:00
Martin Kinkelin
ae52da1bfa Adapt to Loc::linnum and Loc::charnum now being functions 2023-08-26 15:56:02 +02:00
Nicholas Wilson
906037988f
Move abi*.* to abi/ (#4192) 2022-09-21 13:16:04 +00:00
Martin Kinkelin
be9d5817a1 Adapt glue layer to renamed/changed Declaration::linkage 2022-05-06 19:42:18 +02:00
Martin Kinkelin
a4abf305f4
Support 'raw mangles' via leading "\1" in pragma(mangle) strings (#3854)
Such mangled names aren't affected by a target-specific default (C)
prefix, such as `_` on Mac.
2021-10-23 14:30:30 +02:00
Martin Kinkelin
c0630840b7 Fix little C++ header regressions 2021-02-28 17:40:11 +01:00
Martin Kinkelin
079858f3b2 Upgrade frontend & libs to early v2.095.0 (dlang/dmd@a4274b3c39) 2020-11-27 17:45:13 +01:00
Martin Kinkelin
b7c6a2f101 Fix colliding WinEH TypeDescriptors for exceptions with the same TypeInfo_Class name
As reported in https://github.com/ldc-developers/ldc/issues/3501#issuecomment-661551187.

Previously, LDC would simply override an existing TypeDescriptor global
with an equivalent definition if assertions were disabled.

Use different equivalent TypeDescriptors in this exotic case now, by
using proper mangling. [The linker can presumably still fold duplicates
via ICF.]

Ideally, these descriptors would be truly unique, but WinEH depends on
string comparisons to check for matching catch clauses, and currently
depends on TypeInfo_Class.name to generate these strings at runtime when
throwing an exception, see
19731a92a9/src/ldc/eh_msvc.d (L192-L211).
So if those names were fully qualified (`cd->toPrettyChars(*true*)`
during ClassInfo generation), we'd be fine, but that'd obviously be a
breaking change and diverge from upstream.
2020-11-13 06:05:28 +01:00
Martin Kinkelin
e52199469f Upgrade front-end & libs to v2.087.0-beta.1 2019-06-21 15:39:45 +02:00
Martin Kinkelin
7776c4081b Upgrade frontend & libs to v2.083.0-beta.1 2018-10-20 16:19:46 +02:00
Martin
cfad799f48 Merge 2.078.0 front-end and stdlibs 2018-01-06 01:39:18 +01:00
Martin
c251170912 Rename DtoMangled... to getIRMangled... 2017-10-07 14:06:17 +02:00
Martin
c9a3be1295 Let TargetABI fix up LLVM mangles for more special symbols
For ModuleInfos, ModuleRefs, InterfaceInfos, interface vtables & thunks.
2017-10-07 14:06:17 +02:00
Johan Engelen
3cc0c3cba4 Remove dependence on std::to_string, because it is not available on all systems. (#2147)
This PR should enable native compilation on Android.
2017-06-05 17:50:13 +02:00
Martin
383c2d3a59 Range-ify usages of front-end Arrays 2017-06-04 00:29:44 +02:00
Martin
dca21939e1 Merge 2.072.2 front-end
The part needing most attention was ddmd.root.ctfloat, ddmd.target (incl.
gen/target.cpp) and ddmd.builtin. The front-end is now prepared for
elaborate compile-time floating-point types to allow for proper cross-
compilation.

This version still uses the host's `real` type for compile-time reals,
except for MSVC hosts, which still use 64-bit doubles (when compiled with
DMD host compiler too).

Some other changes:

* semantic*() of Statements extracted from statement.d to statementsem.d
* mangle() -> mangleToBuffer()
* Identifier::string -> toChars()
* Token::float80value => floatvalue
* Dsymbol::isAggregateMember() => isMember()
* BoolExp is no more
* ddmd.root.ctfloat: LDC-specific CTFE builtins
2017-01-29 15:48:03 +01:00
Johan Engelen
04b89e642c Windows: Move the prepending of 0x1 to C++ mangled functions from frontend to the backend.
Windows x64 ABI: remove unnecessary \01 from mangled symbol name.

This removes the 0x1 byte from `.mangleof` accessible from user code.
Resolves issue #1519

Also let mangleForLLVM take a std::string, to enable C++11's moves.
2016-05-30 10:18:39 +02:00
Johan Engelen
776e32d801 Add experimental -hash-threshold option to hash very long symbol names. 2016-05-24 11:39:08 +02:00