Commit Graph
108 Commits
Author SHA1 Message Date
David Nadlinger a0ffaf56bf Do not codegen aggregate types from within debug info generation.
This avoids problems where we would codegen children of an
"inner" template instantiation (i.e. a member of a non-template
aggregate in another module) because we have no way to know the
outer (declare-only) entity exists in the respective
mustDefineSymbol invocation.

An example for this are the std.typecons.RefCounted internals of
std.file.DirIterator, as used from std.datetime and other modules.
This is not only inefficient, but also causes linking issues due
to attribute inference for these functions not having run yet
(and consequently the mangled name being different from the
actual definition).
2013-06-16 19:33:04 +02:00
David Nadlinger 292caa1438 Merge the 2.063 frontend. 2013-06-12 20:16:37 +02:00
David Nadlinger f2f3c751b3 Renamed IrStruct to IrAggr, as it is also used for classes.
The class-specific parts should probably be factored out.
2013-06-12 17:16:35 +02:00
David Nadlinger 4971321caf Revert "Add debug info for enums."
This reverts commit 001a39642f, as
it leads to debug mode crashes in rt.lifetime and other modules.

Specifically, the type check assertion in IntegerExp::toInteger
(at expression.c:2017) is hit.
2013-06-07 21:20:14 +02:00
kai 001a39642f Add debug info for enums.
Previously enums were reduced to the underlying type.
Now the symbolic constants can be used.
2013-06-07 16:37:57 +02:00
kai f589bb4271 Improve debug info for vector types and skeleton for enums.
Adds the missing array information. Printing vector values work now.
Also adds a skeleton for enum types.
2013-06-06 07:27:58 +02:00
kai 905da30ce1 Implement debug info for static arrays.
This fixes issue #356.
2013-06-05 07:19:55 +02:00
David Nadlinger 89f9c239fa Merge branch 'release-0.11.0' 2013-06-04 16:50:08 +02:00
David Nadlinger b2bacba7f4 Correct wiki URL in debug info.
The wiki is not available using SSL; thanks to Kai for noticing
this.
2013-06-04 16:46:15 +02:00
David Nadlinger 005f993982 Merge branch 'release-0.11.0'.
Conflicts:
	gen/llvmhelpers.cpp
2013-06-02 21:53:41 +02:00
David Nadlinger ec59399e21 Change all URLs to point to wiki.dlang.org for the time being. 2013-06-02 21:27:02 +02:00
David Nadlinger b9722d6671 Merge branch 'release-0.11.0'.
GitHub: Closes #375.
2013-05-31 22:22:50 +02:00
kai 26eb95d91e Add debug info for vector types. 2013-05-31 22:22:19 +02:00
David Nadlinger c02b38fe9a Removed LLVM 3.0 compatibility code.
There might be still some pieces left here and there, and
there is certainly code that could be rewritten in a nicer
way with the 3.0 requirement out of the picture.
2013-05-31 20:48:38 +02:00
kai 1af71fa536 Fix LLVM 3.4 change to DIBuilder.createFunction().
DIBuilder.createFunction() now requires the return type to be of
subroutine type and consequently needs a DICompositeType.
2013-05-24 08:40:48 +02:00
kai dce378ba75 Return type must be of type DIComposite. 2013-03-23 16:21:21 +01:00
kai c8d98ad31c More Dwarf debug code changes.
Add a fix for LLVM 3.3 (`createTemporaryType()` was removed) and add
linkage name to `createGlobalVariable()` (new in 3.3).
2013-03-23 15:40:29 +01:00
kai 7d65a311b1 More changes to std::vector usage.
Replace with std::vector with static array, llvm::SmallVector or
add code to reserve space.
2013-03-17 23:58:30 +01:00
kai 93c4cf3ea5 Replace more occurances of std::vector with an array. 2013-03-17 00:50:05 +01:00
kai 36be9b5af4 Better encoding of basic types.
The new code distinguishes between bool, int, char, float and complex types.
2013-03-16 21:35:03 +01:00
kai 46f8d999c5 Fix a LLVM 3.3 problem with debug info generation.
In some cases an assertion is triggered because the debug context of a
local variale is verified. It turns out that LLVM returns always false
for DISubprogram.Verify() if the return type is not a composite type.
Reading the Clang source it looks like the return type must be a
subroutine type. This commit introduces a dummy subroutine type to
define the return type.
2013-03-16 21:09:40 +01:00
kai 1e4a8fffc2 Remove DMDV1 and DMDV2. 2013-03-06 10:20:24 +01:00
kai 7fd4fc81c3 Fix LLVM 3.3 compile errors. 2013-02-25 21:18:10 +01:00
David Nadlinger 0a96aea868 Sort includes according to style guidelines:
1. Main include corresponding to .cpp file, if any.
 2. DMD and LDC includes.
 3. LLVM includes.
 4. System includes.

Also updated a few include guards to match the default format.
2013-02-07 21:20:55 +01:00
David Nadlinger 8ff3a8060a Use llvm_unreachable instead of assert(0).
Also removed some unused functions.
2013-02-07 03:38:15 +01:00
David Nadlinger 39e3e3a678 Replace template symbol module fix with more localized hack.
This reverts commit c4adbedcc, which would have fixed the
problem at its roots, but caused strange template function
attribute inference failures in D-YAML, presumably due to
the different order of semantic3 execution on the templates.
2012-12-31 05:46:29 +01:00
David Nadlinger 9458911839 Added LLVM-style license headers to all our files. 2012-12-16 17:19:14 +01:00
kai 2dbee75523 Prefer C++-style casts.
This is based on Item 2 of "More Effective C++". In general, the C++ cast operators are more expressive and easy to find,
e.g. by grep. Using const_cast also shuts up some compiler warnings.
2012-08-02 19:55:29 +02:00
kai b53544b389 Simplify code by using the right type.
Removes some comditional compiling by replacing unsigned with llvm::Attributes.
2012-07-29 18:18:36 +02:00
kai 9bf65bc9a2 Start unification of master and llvm-3.1 branch. 2012-07-29 13:50:30 +02:00
Alexey Prokhin f2ed2e96b0 Use optimized array operators implemented in druntime 2012-02-15 13:16:34 +04:00
Alexey Prokhin 91f4e5d015 Added emission of dwarf lexical blocks.
Also, dropped support for DISABLE_DEBUG_INFO definition.
2011-12-04 15:34:35 +04:00
Alexey Prokhin b8721a8515 Emit debug info for variables that are used in nested functions 2011-12-03 23:45:58 +04:00
Alexey Prokhin cedb4c0e68 When generating debug info, handle recursive types properly 2011-12-03 14:35:55 +04:00
Alexey Prokhin 6357c421ac Updated ldc version and homepage 2011-12-03 13:52:05 +04:00
Alexey Prokhin b97b32759e Use LLVM Machine Code (MC) to emit object files. Finilize debug info 2011-10-25 15:43:49 +04:00
Alexey Prokhin 629f13929e WIP: port to llvm 3.0 2011-10-25 15:43:39 +04:00
Alexey Prokhin 3a0dfac597 Fix file paths in debug info 2011-04-30 17:35:40 +04:00
David Nadlinger 8d545a18c1 Fix crash when declaration is coming without Loc from the front-end. 2011-04-20 19:30:43 +02:00
Kelly Wilson 72ea043124 Recommit klickverbot's patch for LLVM-2.9. 2011-04-20 09:28:37 -06:00
Kelly Wilson 7c81278b9c Backed out changeset 5253bfbb3890 2011-04-20 00:28:23 -06:00
Kelly Wilson b26b0f4196 Upgrade to LLVM-2.9. Thanks to David Nadlinger for the patch. 2011-04-19 21:57:15 -06:00
Moritz Warning 89aeb05042 apply fixed debug info fix, see #452; thanks to sokol 2011-01-14 14:38:38 +01:00
Moritz Warning 9ca6717b5b revert 1826 2011-01-11 03:15:40 +01:00
Alexey Prokhin 38fe715638 Work on debug 2011-01-08 18:00:04 +03:00
Alexey Prokhin f8bf67dc6e Fixed a crash when compiling multiple files in one object file 2010-12-14 14:35:52 +03:00
Alexey Prokhin c3ea7b27c6 Work on debug 2010-12-14 14:35:48 +03:00
Alexey Prokhin bca5491974 A few fixes for debug 2010-10-31 12:11:16 +03:00
Alexey Prokhin d0c7a5a3cb Ported to new debug information format introduced in llvm 2.7 2010-10-30 20:57:32 +04:00
Tomas Lindquist Olsen 1fac40d2bd Update to work with LLVM 2.7.
Removed use of dyn_cast, llvm no compiles
without exceptions and rtti by
default. We do need exceptions for the libconfig stuff, but rtti isn't
necessary (anymore).

Debug info needs to be rewritten, as in LLVM 2.7 the format has
completely changed. To have something to look at while rewriting, the
old code has been wrapped inside #ifndef DISABLE_DEBUG_INFO , this means
that you have to define this to compile at the moment.

Updated tango 0.99.9 patch to include updated EH runtime code, which is
needed for LLVM 2.7 as well.
2010-05-19 12:42:32 +02:00