Commit graph

3545 commits

Author SHA1 Message Date
kai
5aa06092cd Fix issue #570.
The use of std::vector<> is replaced by Array<> for MSVC only. This fixes
the error. But it is still unclear why std::vector<> fails.
2014-01-10 12:08:08 +01:00
kai
37ccbf463c Add standard container methods to Array<>.
With these methods the Array<> class can be used like std::vector<>.
Please be aware that Array::reserve() has a slightly different semantic
than std::vector::reserve().
The intention is to make usage of Array<> more natural.
2014-01-10 12:06:01 +01:00
kai
e1522d7bff Fix NaN constants on ARM.
The dmd source assumes x86 longdoubles which are not available on ARM (and possible other systems).
This leads to an assertion error in PortInitializer. The workaround is to check for the size of
longdouble.
2014-01-07 19:58:51 +01:00
Kai Nacke
1463f4a275 Merge branch 'master' into merge-2.064 2014-01-06 11:24:03 +01:00
David Nadlinger
67a1a3273a Merge pull request #569 from jerro/bugfix
Bugfix
2014-01-05 19:31:20 -08:00
Jernej Krempuš
77c0192c06 Added a check for vector size to gen_gccbuiltins.cpp.
Previously, gen_gccbuiltins was emitting intrinsics
that used vector types larger than 256 bits and those
are not defined in core.simd.
2014-01-06 01:30:34 +01:00
Jernej Krempuš
7436d94e09 Fixed a bug in DtoInlineIR
Before this fix, debug info was removed from the module while
parsing inline ir.
2014-01-06 01:27:26 +01:00
kai
9e33ec5433 Add again little and big endian patterns for NaN. 2014-01-04 17:48:36 +01:00
Kai Nacke
27a9ede3fd Fix error diagnosis for test fail91. 2014-01-04 01:57:56 +01:00
Kai Nacke
acf1ed40b0 Emit error message for struct with unknown size.
This fixes an ICE in test fail91.
2014-01-03 23:36:17 +01:00
Kai Nacke
dcf6ffc3a3 Add test for issue #513 2014-01-03 23:09:12 +01:00
Kai Nacke
59317c58f9 Merge branch 'master' into merge-2.064 2014-01-03 23:07:50 +01:00
Kai Nacke
019d254ea5 Fix for 2nd part of issue #424.
This is a backport from DMD 2.065.
2014-01-03 22:37:48 +01:00
Kai Nacke
61720bf1ba Fix ouput for test diag8354 2014-01-03 18:02:29 +01:00
Kai Nacke
13e00a89ca Some class <-> struct changes.
This is partly a backport from DMD 2.065. It fixes nasty warnings with clang.
2014-01-03 16:14:51 +01:00
Kai Nacke
731f2a8fdf Merge branch 'master' into merge-2.064
Conflicts:
	dmd2/root/rmem.c
2014-01-03 15:56:01 +01:00
Kai Nacke
2eae9b6f79 Use __linux__ to identify Linux-based systems.
This is a backport from DMD 2.065. It is needed to compile LDC2 with -std=c++11.
2014-01-03 15:51:38 +01:00
Kai Nacke
58305e8bfc Remove DigitalMars garbage collector.
This code is not used and gone in later DMD versions.
2014-01-03 15:47:07 +01:00
Kai Nacke
b021a2930d Remove MSVC crap.
The code was a work around and did not solve the underlying problem.
With 2.064 even the work around stops working.
2014-01-03 15:17:08 +01:00
Kai Nacke
9b4a70c367 Use caching in DtoVaFunctionType.
Remove now unused method IrFuncTy.reset().
2014-01-03 15:14:39 +01:00
Kai Nacke
1f204ba9c5 Fix a c++11 issue 2014-01-03 15:01:39 +01:00
Kai Nacke
63d0689e8d Replace deprecated pragma name 2014-01-03 13:58:16 +01:00
Kai Nacke
87006d0a5b Merge branch 'master' into merge-2.064 2014-01-03 13:54:10 +01:00
Kai Nacke
c85ea7d5f7 Remove duplicate "sudo" from .travis.yml. 2014-01-03 13:49:55 +01:00
Kai Nacke
551bce6d18 Change location of assign to irFty.
If the comment about this function is still right (can be called recursively) then the assignment
to irFty should be done after all functions are called.
Takes advantage of move assignment, too.
2014-01-03 13:14:12 +01:00
kai
dfbcb6bfd4 DtoConstSymbolAddress still returns NULL.
This fixes a failure in test ldc_github_248.d.

It would be better if DtoConstSymbolAddress would return undef but this leads to bitcast assertion.
2014-01-02 21:56:59 +01:00
Kai Nacke
58aadf88ef Merge branch 'master' into merge-2.064 2014-01-02 20:31:28 +01:00
Kai Nacke
535221e16d Add llvm-config-3.5 to search list 2014-01-02 15:57:49 +01:00
Kai Nacke
1619b18f73 Small cleanup of attribute mess. 2013-12-31 17:29:25 +01:00
Kai Nacke
5139008207 Add missing forward declations to gen/utils.h 2013-12-31 16:43:54 +01:00
Kai Nacke
a24b8b69b3 Merge branch 'master' into merge-2.064 2013-12-29 20:31:10 +01:00
Kai Nacke
192f3eb13d Fix a typo in MSVC build. 2013-12-29 20:04:34 +01:00
David Nadlinger
33e590932d Merge pull request #560 from klickverbot/assoc-literal
Return  undef instead of null on toConstElem failure.
2013-12-27 10:27:29 -08:00
David Nadlinger
3ec084da59 Return undef instead of null on toConstElem failure.
This fixes a segfault with associative array literals of
arrays of associative array literals, which occured because
of arrayLiteralToConst not handling null values properly.
Ensuring that null pointers are handled correctly in all
toConstElem callers is much more error-prone than just
returning an LLVM undef, an error is emitted anyway.

The root of the problem is actually in the kludgly
implementation of AssocArrayLiteral::toElem, we should
revisit this at some point.
2013-12-27 18:35:50 +01:00
David Nadlinger
6a17b38d83 Merge branch 'master' into merge-2.064. 2013-12-26 15:29:58 +01:00
David Nadlinger
467651fc49 Merge pull request #559 from klickverbot/disable-internalizing-nested-functions
Disable internalizing of nested functions.
2013-12-26 06:27:39 -08:00
David Nadlinger
8c0ad88ec3 Merge pull request #557 from klickverbot/assoc-array-const
Handle differing LLVM types for AA literals.
2013-12-26 06:27:28 -08:00
David Nadlinger
333d538a23 Handle differing LLVM types for AA literals.
This unsfortunately more or less duplicates the code we have for
emitting ArrayLiteralExps, but with the different iteration
strategies, having a single implementation would wind up
even messier.

Unfortunately, no regression test case yet, as I found this deep
inside vibe.d.
2013-12-26 13:39:59 +01:00
David Nadlinger
be185263ba Disable internalizing of nested functions.
This works around linking problems such as rejectedsoftware/vibe.d#338,
caused by the frontend appending template instances to the wrong
module.

GitHub: Fixes #558.
2013-12-26 13:24:41 +01:00
David Nadlinger
bcbb13318a Added test for GitHub #556. 2013-12-26 12:39:52 +01:00
David Nadlinger
68f8e38f51 Merge branch 'master' into merge-2.064. 2013-12-26 12:37:03 +01:00
David Nadlinger
a1ca0def88 Merge pull request #556 from klickverbot/padding-fix
Respect type alignment when choosing zero fill types.
2013-12-26 03:36:17 -08:00
David Nadlinger
f85d2a5a0a Respect type alignment when choosing padding fields.
Fixes ABI mismatch when e.g. padding a 28 byte union from a
20 byte member, where previously, an i64 would be emitted,
yielding a 32 byte LLVM struct size on ulong.alignof == 8
platforms.

Test case will follow on the 2.064 branch.
2013-12-26 12:35:19 +01:00
David Nadlinger
27ecc11915 Remove unused prototype. 2013-12-26 07:05:21 +01:00
Kai Nacke
c231ae0ad0 Merge remote-tracking branch 'origin/master' into merge-2.064
Conflicts:
	gen/arrays.cpp
2013-12-19 21:27:53 +01:00
Kai Nacke
acb1bb161a Fix a problem with the new array bounds check code. 2013-12-19 20:35:54 +01:00
Kai Nacke
5b14263d67 Add CMAKE_DL_LIBS to link command. 2013-12-19 20:35:25 +01:00
Kai Nacke
5f520fccf9 Cache result of DtoFunctionType. 2013-12-19 19:45:16 +01:00
Kai Nacke
62137ca489 ldmd2 requires -lpthread and -lcurses, too.
This is a change to the LLVM CMake files from LLVM 3.5.
2013-12-19 19:16:08 +01:00
Kai Nacke
14ae04c573 Check for terminfo libary.
This fixes another link error on my ARM device.
2013-12-18 22:47:11 +01:00