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
7e82631b94
Revert "DebugInfo: Use DebugLoc::get() for declaration of variable."
...
This reverts commit 3bab8306aa
.
2015-06-05 00:16:48 +02:00
Kai Nacke
3bab8306aa
DebugInfo: Use DebugLoc::get() for declaration of variable.
2015-06-04 22:00:54 +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
0f86de548c
DebugInfo: EmitStopPoint() now has a Loc parameter.
2015-06-04 19:04:23 +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
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
9d3dd1f609
Add true value of "isOptimized" to Dwarf debug info.
2015-05-31 21:32:12 +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
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
kai
17214d2175
Refactoring the debug info for nested local variables.
...
- the debug info is now stored in the IrFunction object
-> saves the lookup from VarDeclaration to IrVar
- uses a llvm::DenseMap instead of std::map
-> no comparison method required
-> hashing should be faster then a tree lookup
2015-04-28 07:16:03 +02:00
kai
28407c6906
Fix a problem with debug info for nested local variables.
...
Debug info for nested local variables must be created for each
function (with different address expression). The resulting
debug info was not stored per function which resulted in the
use of the last created debug info even if it was wrong.
This commit fixes the bug and the current assertion with LLVM 3.7.
2015-04-26 20:06:41 +02:00
Martin
fdd449c4e5
LLVM 3.7: Metadata refactoring continues
2015-04-22 12:17:42 +02:00
Kai Nacke
7591a31df9
LLVM 3.7: Again more metadata changes.
2015-04-17 23:37:09 +02:00
Kai Nacke
31c3195511
LLVM 3.7: More metadata changes.
...
The accessible flags moved into a new class.
Same is true for subroutine type.
2015-04-17 23:02:27 +02:00
Kai Nacke
4fa7e98ebe
LLVM 3.7: DIType.replaceAllUsesWith() is replaced by DIBuilder.replaceTemporary()
2015-04-12 14:16:09 +02:00
Kai Nacke
76a34f2e35
LLVM 3.7: More metadata changes
2015-04-09 22:14:12 +02:00
kai
014627d6a6
Code cleanup: Replace NULL with false in dibuilder.
...
Removes some warnings.
2015-04-05 14:20:31 +02:00
kai
e73a7f2e23
Several updates to debug info generation.
...
- Do not create debug info after we called finalize.
- Clean up debug info generation for module ctor/dtor.
- Rename EmitSubProgramInternal() to EmitModuleCTor().
- Remove unused parameter from CreateTypeDescription().
2015-02-22 21:10:28 +01:00
unknown
674b614807
Update of PassManager interface to match the corresponding deprecation in LLVM's trunk for 3.7
2015-02-16 15:11:42 -08:00
kai
06d9c081ca
DebugInfo: Add accessibility to member types.
...
This removes a FIXME in dibuilder.
2015-02-08 12:51:27 +01:00
Kai Nacke
1d12c61c62
Merge pull request #815 from redstar/llvm36
...
Add changes related to the llvm::Metadata refactoring in LLVM 3.6.
2014-12-26 14:17:22 +01:00
kai
441c98532c
Add changes related to the llvm::Metadata refactoring in LLVM 3.6.
...
In LLVM 3.6, the llvm::Metadata hierarchy is distinct from the llvm::Value hierarchy.
This refactoring causes several changes.
2014-12-25 19:02:15 +01:00
Daniel N
25adc26e47
Add "Debug Info Version"
...
Metadata without a correct version will be stripped by UpgradeDebugInfo.
2014-12-18 12:02:37 +01:00
kai
b3e239a527
Fix generation of DWARF debug information in LLVM 3.6.
...
The creation of complex expressions (e.g. address calculations) was extended in LLVM 3.6.
2014-10-12 12:40:31 +02:00
Alexey Prokhin
66a392a5c2
Rename Type::irtype to ctype for consistency with dmd and gdc
2014-10-05 16:55:12 +04:00
Alexey Prokhin
9ead7f7996
Move debugVariable and debugFunc from VarDeclaration to IrVar
2014-10-05 16:08:52 +04:00
David Nadlinger
ff7ed64920
Revert owningTemplate hack from 39e3e3a6
.
...
It is no longer needed now that we use DMD's model for determining
whether to emit templates. We might also be able to use the more
general tinst/minst machinery from DMD Git master if we ever need
something similar.
2014-10-04 18:11:03 +02:00
Andreas Hollandt
4e3fe8cd7a
fix newline
2014-10-02 14:36:51 +02:00
Kai Nacke
f5a42f2620
createGlobalVariable() requires a context with LLVM 3.6
2014-09-29 23:19:40 +02:00
Kai Nacke
382ad184d8
Merge branch 'master' into merge-2.066
...
Conflicts:
dmd2/builtin.c
gen/classes.cpp
gen/functions.cpp
gen/llvmhelpers.cpp
gen/statements.cpp
gen/toir.cpp
runtime/druntime
runtime/phobos
2014-09-13 23:11:54 +02:00
Alexey Prokhin
18f33b1815
Make IrDsymbol to be a typesafe union to reduce memory usage
2014-09-12 14:43:49 +04:00
kai
aa35307f54
Fix LLVM 3.6 build
2014-08-23 20:02:43 +02:00
Alexey Prokhin
76dec46df5
WIP: merge dmdfe 2.066
2014-08-22 16:01:28 +04:00
Andreas Hollandt
6702954cda
llvm API changes
2014-07-31 18:18:06 +02:00
kai
45fca1f3b5
Add line number to error message of -nogc switch.
...
This was suggested by bearophile in the news group.
It also changes all Loc objects to be passed by reference.
2014-07-04 07:15:05 +02:00
kai
d9d5037c64
Fix assertion error with debug build in LLVM 3.5
...
This is one part of issue #607 .
2014-05-12 21:24:43 +02:00
kai
810e2b6bbc
Add a new parameter required by LLVM 3.5
2014-03-10 06:48:56 +01:00
kai
6287a4d422
Replace ArrayIter<> with Array<>::iterator.
...
Just use the new iterator instead of the old Java-like class.
Also removes a dead iterator and replaces an iterator with a
pointer in some place.
2014-01-11 14:48:41 +01:00
Kai Nacke
87965cdc19
Merge branch 'master' into merge-2.064
...
Conflicts:
runtime/druntime
2013-11-26 08:00:10 +01:00
Kai Nacke
7f017608a8
Use enum literal instead of constant
2013-11-26 07:56:50 +01:00
David Nadlinger
cb341586e3
First merge of 2.064 beta.
...
This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb.
Doesn't build Phobos yet.
2013-10-29 19:21:15 +01:00
kai
3ba3b12783
Fix more LLVM 3.4 debug info problems.
...
The expression llvm::DIType(NULL) is not accepted by LLVM.
This commit replaces this with an unspecified type (which is
new in LLVM 3.4).
2013-09-01 16:47:33 +02:00
kai
6bd78496a1
Preliminary fix for debug info generation with LLVM 3.4.
...
There is no debug information generated for several types.
As LLVM 3.4 does not support empty nodes, it is now time to
implement the missing debug info.
2013-08-20 07:47:12 +02:00
kai
89f59b4eeb
Fix an assertion error regarding void type with LLVM 3.4.
...
In Dwarf debug symbol generation the void type was modelled as
DIType(NULL). This triggers an assertion error with LLVM 3.4.
The solution is to use the unspecified type provided by Dwarf for
this purpose.
2013-08-11 22:16:48 +02:00
kai
c28c7fb134
Introduce a debug info builder.
...
Moves all code from todebug into a new class.
Also caches the compilation unit in order to fix a LLVM 3.4 compile error.
2013-07-29 00:04:08 +02:00