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
Alexey Prokhin
90bb32d2d8
extern(C++) interfaces
2013-06-22 17:33:00 +04:00
kai
609b362410
Fix the LLVM 3.4 build.
...
The disable-simplify-libcalls is gone.
2013-06-21 23:44:42 +02:00
Alexey Prokhin
09c471ae74
Properly implement exception chaining
2013-06-18 17:06:00 +04:00
David Nadlinger
31d85d0910
Merge pull request #398 from ldc-developers/merge-2.063
...
DMD 2.063.1 merge
2013-06-17 14:04:36 -07:00
David Nadlinger
235bb94878
Make -release only disable bounds checking in non-@safe code.
2013-06-17 13:31:21 +02:00
David Nadlinger
1215ffacd3
Complete IrStruct->IrAggr rename.
2013-06-17 13:14:15 +02:00
David Nadlinger
b15588ed15
Finally fix the _d_invariant declaration on x86.
2013-06-17 13:14:14 +02:00
David Nadlinger
e86a87ab6d
Complete switch to extern(D) _d_invariant.
2013-06-17 00:03:52 +02:00
David Nadlinger
0206269230
Ignore StaticAssert in DtoDeclarationExp.
...
Fixes DMD testcase 'testrightthis'.
2013-06-16 21:17:46 +02:00
David Nadlinger
4774745f44
Do not try to generate metadata for unresolved types.
...
This does not fix the root cause, which is likely a frontend
bug/oddity, but avoids the crash.
2013-06-16 20:23:07 +02:00
kai
23fd0c8116
Add debug info for enums.
...
Previously enums were reduced to the underlying type.
Now the symbolic constants can be used.
This is a bug-fixed version of commit 001a3964 .
2013-06-16 20:21:53 +02:00
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
kai
e556882be4
Simplify code for LLVM 3.4.
...
Introduces a compability function instead of a #if/#endif cascade.
2013-06-16 18:22:45 +02:00
David Nadlinger
897c4382af
Do not re-codegen struct literals on taking address of globals.
...
The AST the frontend generates is arguably invalid, but we
have to deal with that.
Fixes DMD testcase 'interpret'.
2013-06-16 01:02:46 +02:00
David Nadlinger
1d9804d03c
Use '__ModuleInfoZ' for ModuleInfos, like DMD does.
...
This way, we stay at least compatible w.r.t. demanglers,
pragma(mangle, …) tricks.
Fixes DMD testcase 'mangle'.
2013-06-16 00:28:02 +02:00
David Nadlinger
acd508945a
Allow multiple declarations to share the same mangled name/LLVM global.
...
This is necessary to enable aliasing compiler-generated
symbols with pragma(mangle, …).
Note that globals for internal use are still directly
created.
2013-06-16 00:28:02 +02:00
David Nadlinger
0305d3bce2
Never make external variables something else than external.
...
Fixes crash in DMD testcase 'mangle'.
2013-06-15 23:22:34 +02:00
kai
f1c71e4bac
Make ldc compatible with LLVM 3.4
...
Development of LLVM 3.4 started with a cleanup of the path class (PathV1).
The changes here let ldc compile at least with rev. 184039 of LLVM.
2013-06-15 19:52:29 +02:00
David Nadlinger
2e0941c194
Add names for globals to make LDC compile against LLVM 3.1.
2013-06-15 16:16:47 +02:00
David Nadlinger
e9d7c10109
Align our copy of TypeInfo code to upstream DMD version.
2013-06-15 15:11:17 +02:00
David Nadlinger
c813ccdcf7
Small debug diagnostics improvements.
2013-06-15 15:04:48 +02:00
David Nadlinger
bca5dac669
Fixed ClassReferenceExp codegen, handle self-referential literals.
2013-06-15 15:04:48 +02:00