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
Martin
417e3d242d
Slightly extend AttrSet (attributes set) for improved usability
2015-11-21 15:08:16 +01:00
Martin
2dfa5e8569
Some more cosmetic fixes
...
Found by searching for lines > 80 chars.
2015-11-05 19:12:32 +01:00
David Nadlinger
c9c854f664
eh: Do not use GC for _d_exception records
2015-11-03 00:53:34 +02:00
David Nadlinger
9df487edff
gen/ir: clang-tidy the world
2015-11-02 11:30:40 +02:00
David Nadlinger
44b0f7b615
driver/gen/ir: clang-format the world
...
This uses the LLVM style, which makes sense for sharing code
with other LLVM projects. The DMD code we use will soon all
be in D anyway.
2015-11-02 00:28:01 +02:00
Martin
90197d6c72
Simplify working with LLVM attributes
2015-11-01 16:19:27 +01:00
Martin
60d676e2a1
Drop support for LLVM < 3.5
...
This allows to clean up the code a little.
2015-10-30 22:24:05 +01:00
David Nadlinger
bd47ea49e6
Merge branch 'master' into merge-2.068
2015-09-24 17:57:25 +02:00
David Nadlinger
f4f55abf27
Use thunks instead of calling _d_toObject for D interfaces
...
This allows us avoid the problems stemming from the 64 kiB
size limit hack in _d_toObject.
GitHub: Fix #1065 .
2015-09-13 20:27:00 +02:00
David Nadlinger
5687866721
_aaGetX -> _aaGetY
2015-08-29 03:09:18 +02:00
David Nadlinger
f0658ea8d1
Remove some no longer used runtime functions
2015-08-29 03:09:17 +02:00
David Nadlinger
ef431836b0
Remove _ad{Eq, Cmp} defines from back when we supported both D1/D2 (NFC)
2015-08-22 19:01:02 +02:00
David Nadlinger
8ed9826de1
Exception chaining reimplementation for correct and lean IR
...
Now we no longer require separate landing pads for collisions
in user code. This leads to less cruft being generated and opens
the door towards folding the successful and exceptional paths
through finally blocks into one.
This commit breaks Win64; ldc.deh2 will also need updating.
2015-08-13 18:24:06 +02:00
Martin
9d5560601a
WIP: fix array construction/assignment wrt. RAII
2015-07-22 01:41:17 +02:00