Martin
b83780538f
Adapt to new string-switch lowering
...
Now all done in the front-end, no need for us to handle it manually
anymore. This also fixes tests/semantic/dcompute.d.
2018-01-07 01:43:12 +01:00
Johan Engelen
7e7de7a69e
Move instrumentation options into their own .h/.cpp files. ( #2472 )
2017-12-28 11:44:51 +01:00
Martin
dfe45715ba
Enable catching C++ exceptions for non-MSVC targets
2017-11-26 18:41:01 +01:00
Martin
c378636fcf
druntime: Use adapted upstream DWARF EH
2017-11-26 18:40:21 +01:00
Martin
b59849ab28
Android: Use proper C assert function signature
2017-11-19 18:56:21 +01:00
Martin
aa97794dc6
Annotate C assert function with nounwind attribute
2017-10-25 00:38:05 +02:00
Martin
30b858781b
-betterC: Use C assert function
...
Instead of druntime's _d_assert[_msg], _d_arraybounds and
_d_switch_error.
Tested by dmd-testsuite's runnable/cassert and compilable/betterCarray.
2017-10-25 00:38:05 +02:00
Martin
c251170912
Rename DtoMangled... to getIRMangled...
2017-10-07 14:06:17 +02:00
Martin
192649326d
Remove dead code
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
Martin
0b28925e9a
Win32: Remove extra leading underscore from D symbol mangling
...
This is compatible with DMD.
2017-10-07 14:06:17 +02:00
Martin
2616261fd2
Revise all LDC-specific errors/warnings/deprecs and insert backticks
...
For DMD's new syntax highlighting. I grepped in all .{h,cpp} files only.
2017-08-03 22:53:49 +02:00
Martin
1fb269f940
Drop support for LLVM < 3.7
2017-07-16 02:18:00 +02:00
Martin
5f0e83824b
Update 2 hardcoded strings used in error messages
2017-06-17 19:49:54 +02:00
David Nadlinger
747f7a3dfa
clang-format files touched in d01a91f7
[nfc]
...
Some housekeeping on files that recently saw large changes anyway.
2017-05-24 21:35:40 +01:00
Martin
d01a91f755
Allow multiple occurrences for almost all command-line flags
...
Except for `-sanitize` and `-cache-prune*`.
2017-05-23 20:53:57 +02:00
Johan Engelen
ba1ed88b55
Remove magic +1 constant for parameter indexing. ( #2120 )
...
Remove magic +1 constant for parameter indexing.
LLVM may change the indexing offset in the future. See http://llvm.org/viewvc/llvm-project?view=revision&revision=302060
2017-05-20 08:48:48 +02:00
Johan Engelen
64df1687a8
Fix LLVM 5.0 compilation.
2017-04-14 12:55:19 +02:00
Johan Engelen
9e394e4f99
Fix LLVM 5.0 build. ( #2050 )
...
llvm::AttributeSet was renamed to llvm::AttributeList
2017-03-29 22:26:17 +02:00
Johan Engelen
bd09cdc659
Optimize static array comparisons to a memcmp call for types for which this is valid.
...
Resolves #1632
2017-03-01 00:37:48 +01:00
Johan Engelen
d49acaca27
Fix -finstrument-functions. The wrong return address was used.
2017-01-08 22:30:38 +01:00
Rainer Schuetze
99d455226e
fix build against LLVM master: llvm/Bitcode/ReaderWriter.h has been split and renamed
2016-11-13 11:05:53 +01:00
LemonBoy
596fc82254
Implement -finstrument-functions.
...
Closes #1839 .
2016-11-06 23:17:04 +01:00
kinke
498cf6df8d
Merge pull request #1833 from kinke/reenableRuntimeFunctionsCheck
...
Re-check existing runtime function declarations for matching type
2016-10-23 02:13:24 +02:00
David Nadlinger
c083a67e3e
Mark _d_throw_exception as cold/noreturn
...
`noreturn` have been inferred already by the `unreachable` following
the call, but being explicit can't hurt.
2016-10-21 23:04:00 +01:00
Martin
d7b45f7c7d
Revert "Revert "Check existing runtime function declarations for matching type""
...
This reverts commit 2de6538241
.
2016-10-15 23:30:07 +02:00
David Nadlinger
bb2b648d8e
Shared library support for OS X ( #1705 )
2016-10-15 16:17:39 +01:00
David Nadlinger
2de6538241
Revert "Check existing runtime function declarations for matching type"
2016-08-15 15:47:19 +02:00
David Nadlinger
94b111c971
Merge pull request #1570 from kinke/runtime_check
...
Check existing runtime function declarations for matching type
2016-08-15 14:55:18 +02:00
Martin
a5e5bd1716
Keep _d_newclass() semantics, re-introduce _d_allocclass() instead
...
And use that one in DtoNewClass(), keeping 3rd party code from breaking.
2016-08-15 13:19:11 +02:00
Martin
7151302a06
Check existing runtime function declarations for matching type
...
This fixes issue #958 by checking the function type of an existing
function declaration with the same runtime function name inside the
codegen'd module.
This should normally be an existing forward declaration from a previous
runtime call, but the user is free to declare (and even implement) it
too.
The LOC for the error is empty as the provided `loc` may likely be from
a template instantiation from another module.
2016-06-20 00:09:42 +02: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
7657e5f7d8
Move ArrayParam helper type to llvmhelpers.h to make it available for use elsewhere.
2016-04-18 09:50:19 +02:00
Dan Olson
cd216538f9
Merge branch 'master' into objc-wip
2016-04-08 22:38:39 -07:00
Martin
5693942e6e
Merge branch 'ltsmaster'
...
Conflicts:
gen/runtime.cpp
runtime/druntime
runtime/phobos
tests/d2/dmd-testsuite
2016-03-27 19:51:44 +02:00
Kai Nacke
34ac5c5f3a
Add 'cold' and 'noreturn' attributes to _d_assert et.al.
...
These functions are only called at most once: in case of a failure.
They always raise an exception and never return normally. Marking
them as 'cold' and 'noreturn' may help the (not yet added) IRCE pass.
Also adds the missing 'uwtable' attribute for x86_64 and clang-format
the file.
2016-03-27 14:53:57 +02:00
Dan Olson
00e6472931
Fix bad assert conditional
...
I guess I should test with LLVM asserts on :-(
2016-03-24 00:22:49 -07:00
Dan Olson
5b090baef3
Objective-C runtime cleanups
...
Only create runtime calls when Objective-C is supported.
2016-03-23 23:33:26 -07:00
Rainer Schuetze
3adf19c50d
_d_enter_catch can throw, so it might have to be invoked
2016-03-13 17:27:55 +01:00
Rainer Schuetze
83368904d1
- add classinfo argument to _d_eh_enter_catch
2016-03-13 17:27:54 +01:00
Rainer Schuetze
2a86b7250a
replace _d_skipCleanup var with callbacks _d_enter_cleanup, _d_leave_cleanup
2016-03-13 17:27:54 +01:00
Rainer Schuetze
aad27069ca
MSVC/x86 EH support using __CxxFrameHandler3 personality
2016-03-13 17:27:51 +01:00
Dan Olson
98a608e925
First proof -of-concept for objc support
...
This at least shows a path forward. Pretty much a kludge to at this
point, but passes the tests.
2016-03-02 00:30:58 -08:00
Johan Engelen
acdcc4a8c1
Merge branch 'master' into merge-2.069
2016-02-13 20:12:17 +01:00
Johan Engelen
29ce4012af
dmd2 --> ddmd. Merge (almost all of) our changes to dmd source into the new D source of dmd 2.069.2.
...
Also adds the CMake infrastructure to compile and link the D source files.
The build is partially broken:
- A few files in Phobos and druntime do not build
- MSVC build is broken because of unresolved symbols involving reals
2016-01-28 19:03:58 +01:00
David Nadlinger
2b7349b968
buildRuntimeModule: Always create _d_dso_registry forward decl
...
The added overhead for Windows et al. is utterly insignificant
compared to all the other typically unused declarations that
will be created by this, and copy/pasting the long condition
(see d072bdf
) is error-prone. The alternative would have been
to factor the check out into a predicate function.
2016-01-24 16:44:53 +01:00
Kai Nacke
d072bdf7b6
Do not use global.params.is<OS>
...
This PR replaces the few uses of global.params.is<OS> with
global.params.targetTriple.isOS<OS>(). This avoids adding a new
boolean for each supported OS.
It also defines all xBSD-type OS as using the dso-registry.
2016-01-12 09:15:05 +01:00
Kai Nacke
062fef3677
FreeBSD: generate calls to _d_dso_registry (as expected by druntime).
...
This fixes issue #1119 .
2016-01-09 21:10:11 +01:00
Martin
b9f7d2b499
Normalize signatures of EH runtime functions
2015-12-04 15:07:47 +01:00
Johan Engelen
70a6e73188
Cleanup runtime fwd decls and use ABI functiontype rewriting
2015-11-22 01:27:26 +01:00