David Nadlinger
4987894468
Also make storage for immutable array const initializers constant/unnamed_addr.
2013-10-09 05:32:41 +02:00
David Nadlinger
47e212178e
Emit array literals as unnamed_addr.
...
There is really no reason not to.
2013-10-09 04:34:32 +02:00
David Nadlinger
26e3cc8a40
Never emit long array literals as inline constant.
...
Also cleaned up rest of the code a bit.
The LLVM 3.1 problem was already fixed before by not doing
anything on zero-element arrays anyway.
2013-10-09 04:27:41 +02:00
David Nadlinger
0cdb74aae7
Do not heap-allocate immutable array literals.
2013-10-09 04:07:46 +02:00
David Nadlinger
60cdf58168
Combine ArrayLiteralExp::toConstElem and initializeArrayLiteral implementations.
2013-10-09 04:07:46 +02:00
David Nadlinger
eb3261f93c
Do not GC-allocate temporary for static array initialization.
2013-10-09 01:51:45 +02:00
David Nadlinger
9866e5a14f
Comment typo fix.
2013-10-09 01:51:45 +02:00
David Nadlinger
44f60199ad
Factored actual literal building code out of ArrayLiteralExp::toElem.
2013-10-09 01:51:45 +02:00
David Nadlinger
71c67457c3
Cleanup: Kill backend_init/term.
2013-10-06 01:33:28 +02:00
Alexey Prokhin
19d8845bef
DtoType doc
2013-10-05 19:41:43 +04:00
Alexey Prokhin
8fea7484fe
Don't use TypeFunction::funcdecl as it is about to be removed
2013-10-05 19:04:18 +04:00
Alexey Prokhin
b819975c84
Eliminate the need for TypeFunction::funcdecl
2013-10-05 19:03:03 +04:00
David Nadlinger
f35176efad
Fix SymOffExp::toConstElem.
...
I am surprised and horrified at the same time that the test suite
(on platforms other than Windows, where the code path is triggered
in core.stdc.stdio) did not catch this at all.
The elemSize-dependent path probably doesn't make too much sense for
global variables, as it always refers to the total size of the global.
Should add a special case for arrays for clearer codegen in those cases.
GitHub: Fixes #477 .
2013-09-21 18:53:26 +02:00
David Nadlinger
b17a6421a4
Merge pull request #475 from klickverbot/assert-release-trap
...
Emit trap for assert(0) in release mode.
2013-09-15 23:46:26 -07:00
David Nadlinger
945f4882c2
Emit trap for assert(0) in release mode.
2013-09-15 23:53:52 +02:00
David Nadlinger
3556f52b95
Fix _d_invariant mangling on MinGW/Win32.
...
This is getting uglier and uglier, should probably just switch back
to extern(C) irrespective of what upstream DMD does.
2013-09-15 19:57:25 +02:00
David Nadlinger
dd2a2a6cf9
Merge pull request #456 from klickverbot/issue-447
...
Properly handle delegate literals in nested context code.
2013-09-12 14:38:03 -07:00
David Nadlinger
243146199f
Function literals start again at nesting depth zero.
...
GitHub: Fixes #447 .
2013-09-12 13:47:54 +02:00
David Nadlinger
e5463f77b7
FuncDeclaration::nestedVars should only be filled in DtoCreateNestedContextType.
2013-09-12 13:46:45 +02:00
David Nadlinger
0063546bc3
Added newline at end of file.
2013-09-12 10:23:21 +02:00
David Nadlinger
90127ab87a
Fix broken indentation in debug log output.
2013-09-12 10:21:01 +02:00
David Nadlinger
14bc59f31a
Nested context creation code beautification.
2013-09-12 10:14:17 +02:00
kai
e0288564a8
Fix annoying clang warning about missing newline
2013-09-11 06:56:08 +02:00
kai
d38448d664
Changed mangling for naked assembler on Win32.
...
Reported by Temtaime on the newsgroup!
2013-09-08 12:30:04 +02:00
kai
3c800d2380
Fix for issue #461
2013-09-01 23:09:06 +02: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
6875d8a20f
Mark frontend generated strings with attribute unnamed_addr.
...
This is part of a fix for issue #133 .
2013-08-18 23:34:41 +02:00
kai
80a65e34f3
Use memset to initialize arrays with constant byte value.
...
This extends the existing code for null values.
2013-08-18 21:58:07 +02:00
kai
62683c4efe
Simplify calling memcpy/memset
2013-08-18 20:56:24 +02:00
kai
f769406216
Fix for issue #119 .
...
Instead of creating individual stores to the array elements an constant
array is created and assigned to the destination memory. This is much
less IR than before. With -O it is optimized to a memset.
2013-08-18 19:36:58 +02:00
kai
b1160c3d16
Fix for issue #440
2013-08-17 13:02:26 +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 Nacke
07cb4cca0d
Merge pull request #434 from AlexeyProkhin/minimize-dmd-diff
...
Minimize dmd diff
2013-07-30 22:39:10 -07:00
Alexey Prokhin
d45931972c
Move Target implementation out of dmdfe
2013-07-29 11:18:25 +04: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
Alexey Prokhin
21b07c783a
Remove Module::moduleInfoType
2013-07-28 21:59:01 +04:00
Alexey Prokhin
69e7907875
Move implementation of Module::buildTargetFiles and Module::buildFilePath to gem/module.cpp
2013-07-28 21:17:25 +04:00
Kai Nacke
795df4da1b
Merge pull request #427 from AlexeyProkhin/issue426
...
Fixed issue #426 — dtor / destructor not called for (rvalue) struct used in opApply
2013-07-20 11:19:07 -07:00
Alexey Prokhin
8b783da523
Fixed cases where the destructor is called on an uninitialized temporary
2013-07-10 18:15:05 +04:00
Alexey Prokhin
1999749415
Issue #426 part 2. Generate a try-finally block only if it is required
...
(i.e. there are actually some destructor calls that are needed to be put into finally)
2013-07-10 13:34:52 +04:00
Alexey Prokhin
71023952d4
Issue #426 part 1. Wrap destructor calls of temporary variables in a try/finally expression.
2013-07-10 13:34:52 +04:00
kai
e5655c5e05
Add command line option for the thread model.
...
On Linux/PPC, just ignore the provided model. Only local-exec is supported.
2013-07-10 07:52:48 +02:00
kai
1669c16f2b
More fixes to debug info.
...
In many places a compilation unit is expected but only a DIDescriptor is passed
to the builder. This can result in assertion errors.
2013-07-03 06:42:54 +02:00
kai
a78ccbf851
Fix assertion error with LLVM 3.4.
...
There is a distinction between compile unit and file which is disregarded by ldc.
It is possible that more places are broken.
2013-07-02 22:48:04 +02:00
kai
fa40b29160
Fix for issue #419 .
...
The vector type was not handled in `DtoConstArrayInitializer()`.
2013-07-01 07:30:27 +02:00
Kai Nacke
ebadc7fcb3
Merge pull request #412 from AlexeyProkhin/cpp
...
extern(C++) interfaces
2013-06-30 15:37:10 -07:00
kai
67a9391f79
Replace an old-style cast.
2013-06-30 22:30:13 +02:00
kai
cf88271ab9
Replace llvm::sys::Path with std::string.
...
In many cases this is straightforward. It makes the source LLVM 3.4 compatible without using #idef's.
2013-06-29 14:20:44 +02:00
kai
7194ccff0c
Simplify file handling code.
...
Removes dependency of a DMD class and is compatible with LLVM 3.x.
2013-06-29 13:00:46 +02:00