Commit Graph
188 Commits
Author SHA1 Message Date
David Nadlinger 11619e55a9 Fix miscompilation of some functions returning structs. 2012-10-14 03:41:15 +02:00
kai a7c7b514c0 Add changes for LLVM 3.2
- The Attributes class was changed again
- TargetData was renamed to DataLayout

Compiles again with LLVm 3.0, 3.1 and trunk(3.2).
2012-10-13 18:54:42 +02:00
David Nadlinger e7c72b072b Default to C-style variadics for all calling conventions.
Fixes DMD testcase 'callingconv'.
2012-09-27 23:53:04 +02:00
David Nadlinger f54fa0077a Only allow a single D main() function.
Fixes DMD testcase 'fail5634'.
2012-09-27 20:22:52 +02:00
David Nadlinger d4eafe53e0 Removed obsolete nested context styles.
NChybrid was the only one that didn't instantly trigger a "not
implemented" assertion on any code using nested function for a long
time, and removing the cruft greatly improves code readability
(maintainability is a moot point anyway given its current state).
2012-09-07 03:51:33 +02:00
David Nadlinger ee4285f934 Properly handle DMD-internal "reference variables".
Previously, we just had a hack to make ref foreach statements work.
This commit enables them to work in other cases as well, like the
implicit __result variable for functions with out-contracts (which
is such a magic ref variable for ref-returning functions).

Fixes DMD testcase 'testcontracts'.
2012-09-07 03:51:33 +02: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 dbb5a34eda Add changes for LLVM 3.2. 2012-07-29 17:31:50 +02:00
kai 9bf65bc9a2 Start unification of master and llvm-3.1 branch. 2012-07-29 13:50:30 +02:00
David Nadlinger cef19fb225 Fix #125 – Nested class context pointer invalid (D1).
Patch originally by Alexey Prokhin, thanks.
2012-06-24 16:18:47 +02:00
Dan Sanduleac 2748cdaa88 Fix #49: Static arrays that don't fit in a register should be passed using byval 2012-06-05 02:52:25 +01:00
Eldar Insafutdinov feefad412c Move cl_options out of LDCShared 2012-04-02 14:53:52 +01:00
Alexey Prokhin 4d3ba3594c Refactoring: moved ldc specific code from dmd/attrib.c and dmd2/attrib.c into gen/pragma.cpp 2012-02-15 13:16:06 +04:00
Alexey Prokhin 15a903580b Partial fix for #69 — LDC1 from master fails to build Tango.
Fixed regression that has been introduced in commit 9889067.
2012-01-29 12:32:13 +04:00
Alexey Prokhin 9889067420 Fixed #53 — Assertion !isaStruct(t) 2012-01-10 19:46:32 +04:00
Alexey Prokhin b41688a0b8 DMD Issue 6859 - Segfault when abstract method uses with contract. 2011-12-16 20:15:31 +04:00
Alexey Prokhin 88cff99bd4 Merge dmdfe 2.057 2011-12-16 19:44:56 +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 629f13929e WIP: port to llvm 3.0 2011-10-25 15:43:39 +04:00
Alexey Prokhin a75b08bc00 Fixed accessing struct members via alias this 2011-09-13 21:01:39 +04:00
David Nadlinger 21a05aa971 Merge branch 'default' into 'merge'. 2011-07-29 00:37:30 +02:00
David Nadlinger 15c5316e26 Prevent two function with same mangled name but different types from being declared.
Previously, LDC would crash in the backend due to the fact that the IR is typed in such cases (we recently had such an instance with Tango, where an extern( C ) function was declared once with int and once with size_t).
2011-07-27 23:01:22 +02:00
Alexey Prokhin 79edefdc37 Fixed compilation of functions that does not have return statement but contain inline asm 2011-07-19 22:22:49 +04:00
Alexey Prokhin 4cc10019ee Fixed an assertion in DtoType() 2011-07-19 19:58:38 +04:00
Alexey Prokhin 805fb5cfc1 D2: pass static arrays into functions by value 2011-04-30 15:30:57 +04:00
Alexey Prokhin 6bc2431b6b Skip unittests in imported modules 2011-04-30 15:30:57 +04:00
David Nadlinger 7a24e12736 Cleanup: Remove unused code in backend, silence some warnings.
This removed quite some clutter that has presumably piled up because LDC is seldom built with a lot of warnings enabled due to DMDFE.
2011-04-24 12:21:33 +02:00
Moritz Warning fbb32c24cb another merge 2011-02-27 20:11:13 +01:00
Moritz Warning b752882184 merge from alexeys branch 2011-02-24 13:22:17 +01:00
Moritz Warning fb418bf2e6 Added -disable-red-zone flag.
This will disable the usage of the 'red-zone' in ABIs that make use of it (like x86). This mimics the exact flag used by clang. It is comparable to the -mno-red-zone flag in gcc. - thanks to wilkie
2011-02-23 23:50:53 +01:00
Alexey Prokhin e921998d75 A few fixes for 64bit 2011-02-23 12:49:57 +03:00
Alexey Prokhin b0d97b139a It is probably wrong, but it fixes compilation of phobos with -g flag 2011-02-20 19:00:48 +03:00
Alexey Prokhin e01aed4327 Fixed passing of static arrays into functions.
This patch finally do what commit 99ee6091cc5e supposed to do...
2011-01-07 09:46:46 +03:00
Alexey Prokhin 54e3121ad9 Reverted "Fixed passing of structs and static arrays into functions." 2011-01-06 20:06:27 +03:00
Alexey Prokhin e9dacd97e2 Fixed passing of structs and static arrays into functions.
Not sure if it is correct, though.
2011-01-06 17:07:44 +03:00
Alexey Prokhin c5e9784863 Updated to dmdfe 2.051 2011-01-05 18:21:40 +03:00
Alexey Prokhin 67daf2fe0a Fix for variadic functions 2011-01-04 14:18:50 +03:00
Alexey Prokhin 8a49067776 Increment vgates in static constructors. That fixes static destructors of templates. 2011-01-02 17:43:02 +03:00
Alexey Prokhin 16b0fe136e Fixed a crash in DtoDefineFunction. 2010-12-31 14:07:33 +03:00
Alexey Prokhin 8d7ff66019 Fixed the order of static destructors 2010-12-30 14:04:24 +03:00
Alexey Prokhin 6c2ccaf945 Fix for shared static constructors and destructors 2010-12-30 14:04:24 +03:00
Alexey Prokhin 71f653f19b Fixes for closures 2010-12-15 17:05:16 +03:00
Alexey Prokhin 3eb6b5e8c8 Fixed a crash when compiling test runnable/A16. 2010-12-14 14:35:52 +03:00
Eldar Insafutdinov 410cb0dc4e fix building of ldc1 2010-11-05 22:40:36 +00:00
Alexey Prokhin 14c6dfb895 Added pointers to shared constructors and destructors to ModuleInfo. 2010-11-05 17:40:29 +03:00
Alexey Prokhin b1e5993873 Started work on phobos 2010-10-27 18:13:46 +04:00
Alexey Prokhin 4d7a6eda23 Different fixes for d2 2010-10-07 22:35: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