Johan Engelen
2898ce340d
Fix bug introduced by f626a3f340
2016-02-14 18:06:33 +01:00
Johan Engelen
f626a3f340
Fix for dmd-testsuite/compilable/ice13792.d: compilation with -gc of fwd declared enum (opaque enum type).
2016-02-14 17:35:09 +01: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
Rainer Schuetze
f94c34ea33
The size of the alloca must match the size described by debug info.
2016-01-22 16:07:38 +01:00
Johan Engelen
4399271762
Fix a few compiler warnings.
2015-12-22 12:36:28 +01:00
Martin
71912511a5
Adaptations for recent LLVM 3.8 master changes
2015-11-08 14:06:16 +01:00
David Nadlinger
0d53ca7aea
dibuilder: Reduce number of version conditions that cut statements
...
The code ends up being a bit longer, but imho much more readable.
2015-11-03 11:21:35 +02:00
David Nadlinger
05d45350aa
clang-tidy: Add readability-else-after-return
2015-11-02 11:30:40 +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
2d959ea540
Make use of C++11 range-based for
...
Should be available now that support for LLVM < 3.5 has been dropped.
2015-11-01 14:49:04 +01:00
David Nadlinger
6bf9a7c63e
Merge pull request #1176 from kinke/cleanup
...
Drop support for LLVM < 3.5
2015-10-31 19:35:32 +02:00
David Nadlinger
3fb689caea
Emit debug info for ref and out parameters
...
Fixes DMD testcse 'gdb4149'.
2015-10-31 12:34:55 +02: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
Rainer Schuetze
27cb609bd8
update to LLVM master changes
2015-10-24 19:53:14 +02:00
Rainer Schuetze
7413f1a8f5
fix build against llvm master (llvm 3.8)
2015-10-17 16:07:17 +02:00
Martin
643eb0cfdf
Debug infos: don't emit a column info if line number == 0.
...
The 2.068 front-end seems to emit such `Loc`s, and LLVM complains about
them. So this fixes a bunch of compile errors for merge-2.068.
2015-09-26 16:37:21 +02:00
Martin
070571730f
Fix debuginfos of special functions for LLVM 3.7+
2015-09-25 20:52:31 +02:00
David Nadlinger
4bcae9731a
The big catch/finally rework, part 2
...
Now with *almost* working EH codegen. Does not compile Phobos yet
because we run into the "instruction does not dominate all uses"
issue when an r-value result of toElemDtor is used and we need to
run cleanups in between. Should easily be fixed by promoting those
values to allocas.
Most of the changes outside of ir/irfunction.{h, cpp} are just
because CreateCallOrInvoke moved locations. I took the
opportunity to also make use of the different arg count
overloads where possible.
2015-08-19 19:56:39 +02:00
Martin
4b6bd7ab52
Merge branch 'master' into merge-2.067
2015-07-18 16:02:51 +02:00
Kai Nacke
269e64e52e
Add LLVM 3.7 changes to latest code merges.
2015-07-14 22:45:35 +02:00
David Nadlinger
70de999e12
Merge branch 'master' into merge-2.067
2015-07-13 20:40:16 +02:00
David Nadlinger
4e2bc18957
Fix debug info builds with inlining on
...
This is likely an LLVM bug: The code in InlineFunctions.cpp
only updates the source location metadata for the instructions
in the inlined callee when the call site has a source location
set. When the caller has no location metadata, the scope for
the inlined instructions thus still points to the DISubprogram
for the original callee. This then leads to an assertion during
codegen.
GitHub: Fixes #998 .
2015-07-13 02:22:38 +02:00
Kai Nacke
d1e764cec1
Backport of "Avoid using llvm::Linker" to master.
...
See pull request #974 for the original code.
2015-06-27 22:08:44 +02:00
David Nadlinger
0922254dd1
Directly emit IR into same llvm::Module instead of using Linker
...
GitHub: Fixes #970 .
2015-06-14 21:36:35 +02:00
David Nadlinger
6277218d7b
Merge branch 'master' into merge-2.067
2015-06-14 21:26:56 +02:00
David Nadlinger
e5838342df
We always define functions for which we emit DWARF subprograms
...
This fixes a crash with debug info for lambdas, where DMD appends
the lambda function declaration to the wrong module.
But the comparison is supposed to be tautological anyway, as we
only ever call it from DtoDefineFunction. Furthermore, it seems as
passing false can never work unless you manually (without going
through llvm::DIBuilder) resolve the Vars node later. Clang does
not try to do this either.
2015-06-14 04:06:35 +02:00
Kai Nacke
57103829bb
Merge branch 'master' into merge-2.067
2015-06-05 14:03:17 +02:00
Kai Nacke
95c897ab3e
DebugInfo: Use location of variable declaration instead of current stop point.
...
There might be no valid stop point but the variable should always have a
location. This fixes an ICE compiling core.demangle.
2015-06-05 13:04:30 +02:00
Kai Nacke
5523330115
Merge branch 'master' into merge-2.067
2015-06-05 00:18:10 +02:00
Kai Nacke
7e82631b94
Revert "DebugInfo: Use DebugLoc::get() for declaration of variable."
...
This reverts commit 3bab8306aa
.
2015-06-05 00:16:48 +02:00
Kai Nacke
cddb59f7b7
Merge branch 'master' into merge-2.067
2015-06-04 22:02:52 +02:00
Kai Nacke
3bab8306aa
DebugInfo: Use DebugLoc::get() for declaration of variable.
2015-06-04 22:00:54 +02:00
Kai Nacke
80acadc841
Merge branch 'master' into merge-2.067
2015-06-04 20:48:38 +02:00
Kai Nacke
482711a601
DebugInfo: Do not emit line info if line number is zero.
2015-06-04 20:19:18 +02:00
Kai Nacke
45ec6a0512
Merge branch 'master' into merge-2.067
2015-06-04 19:07:28 +02:00
Kai Nacke
0f86de548c
DebugInfo: EmitStopPoint() now has a Loc parameter.
2015-06-04 19:04:23 +02:00
Kai Nacke
131529ecc8
Merge branch 'master' into merge-2.067
2015-06-04 18:02:15 +02:00
Kai Nacke
3b363a1b08
DebugInfo: Add more flags and other refinements.
...
In D all functions are prototyped. Mark the hidden this pointer with
flag ObjectPointer. Also add a column for a lexical block start.
2015-06-04 18:00:24 +02:00
Kai Nacke
fe2b9d445d
Merge branch 'master' into merge-2.067
2015-06-04 16:24:31 +02:00
Kai Nacke
816ecf5502
DebugInfo: At a stop point at end of function.
2015-06-04 16:23:22 +02:00
Kai Nacke
15b1ee1576
DebugInfo: Output the underlying delegate for lazy parameters.
...
This fixes issue #959 .
2015-06-04 15:09:29 +02:00
Kai Nacke
fba1e18427
Merge branch 'master' into merge-2.067
2015-06-04 12:46:49 +02:00
kai
9d3dd1f609
Add true value of "isOptimized" to Dwarf debug info.
2015-05-31 21:32:12 +02:00
Kai Nacke
ccd8dd06c5
Merge branch 'master' into merge-2.067
2015-05-23 23:53:36 +02:00
Kai Nacke
f1c4cf92ff
Possible fix for issue #938 .
...
The functions for all arrayops are compiler-generated but the functions
which are also defined in druntime are never emitted. This prevents
inlining of the function body and causes issue #938 .
The fix is to emit the arrayops if inlining is enabled and otherwise
use the druntime provided implementations.
An alternative approach could be to always emit the arrayops and
never use the druntime version.
2015-05-23 23:02:17 +02:00
Kai Nacke
60c5d5d9bd
Fix merge errors in dibuilder.cpp.
2015-05-01 13:32:01 +02:00
Kai Nacke
f029c9b9af
Merge branch 'master' into merge-2.067
...
Conflicts:
gen/dibuilder.cpp
gen/dibuilder.h
2015-05-01 11:28:47 +02:00
kai
6ab801361a
LLVM 3.7: Debug info classes changed again.
...
The solution is to use a typedef to hide the differences in most cases.
2015-04-30 22:43:31 +02:00