Commit graph

80 commits

Author SHA1 Message Date
David Nadlinger
1bb14c45d2 Removed trailing whitespace. 2012-12-16 17:19:15 +01:00
David Nadlinger
9458911839 Added LLVM-style license headers to all our files. 2012-12-16 17:19:14 +01: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
5fa1a903e8 DtoResolveStruct cleanup.
irField is only set in DtoResolveStruct, so the comment was misleading.
2012-10-06 19:27:55 +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
Alexey Prokhin
7431d58702 Rewritten initialization of global variables. 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
e921998d75 A few fixes for 64bit 2011-02-23 12:49:57 +03:00
Alexey Prokhin
d128210f23 Fixed initialization of a struct with an array from another struct 2011-01-02 17:42:59 +03:00
Moritz Warning
ba88a9325d fixes #416 :: LDC crashes when trying to build Tango on OS X; thanks klickverbot 2010-08-04 16:28:09 +02:00
Benjamin Kramer
c220dcac05 IntegerType is now contextifed.
Requires llvm >= 78969. resistor says this will be the last context API change :)
2009-08-14 00:39:18 +02:00
Benjamin Kramer
977fa551ee Push the context through StructType::get.
Requires LLVM >= 78258. Also remove old #if's.
2009-08-06 01:47:39 +02:00
Benjamin Kramer
4c5457ba61 getNullValue is in Constant again
Requires LLVM >= r77721
2009-07-31 23:01:29 +02:00
Benjamin Kramer
66101517d7 LLVMContext changes up to r77366 2009-07-30 15:25:10 +02:00
Benjamin Kramer
d7049de966 More factory methods moved to LLVMContext 2009-07-15 18:09:41 +02:00
Benjamin Kramer
0ee2f34611 Don't use llvm::getGlobalContext() anymore 2009-07-13 20:16:15 +02:00
Benjamin Kramer
331319dab1 Build fix for the latest LLVMContext changes (LLVM r75445)
This shouldn't break the build with older LLVM revs. We include
LLVMContext.h in gen/llvm.h now to make the transition a little bit
easier.
2009-07-13 12:17:58 +02:00
Frits van Bommel
287b1278d3 Remove struct padding when passing or returning in registers on x86-64 (extern(D) only) 2009-05-14 20:36:55 +02:00
Christian Kamm
b6ad8b69ab Add newline to get rid of warning. 2009-05-07 21:07:50 +02:00
Tomas Lindquist Olsen
ca4f588c08 Fixed deal breaker bug for more-at-once compilation when any module contained aggregates. Fixes ticket #272 . 2009-05-07 02:10:29 +02:00
Tomas Lindquist Olsen
617861ead4 Fixed file name in imported mixins containing assertions. 2009-04-29 18:39:59 +02:00
Tomas Lindquist Olsen
ba38e15f0d Fixed class default initializers and type generation. Bug #260 is fixed. 2009-04-27 03:40:40 +02:00
Tomas Lindquist Olsen
e01917bc0d Make typeinfo for struct 2009-04-16 22:19:36 +02:00
Tomas Lindquist Olsen
414e58a318 Fixed forward referenced structs. 2009-04-16 20:41:27 +02:00
Tomas Lindquist Olsen
9a86f9c0b5 Fixed some minitest regressions. 2009-04-16 19:21:30 +02:00
Tomas Lindquist Olsen
37cf5a5789 Added Doxygen file.
Completely seperated type and symbol generation. Should fix a lot of bugs, but is not yet 100% complete.
2009-04-15 20:06:25 +02:00
Tomas Lindquist Olsen
740cdaa588 Fixed forward reference problem in struct methods on x86-64. 2009-03-28 09:00:32 +01:00
Tomas Lindquist Olsen
36f6ebc77f - Versioned Expresssion::toElem with #if IN_DMD/IN_LLVM.
- Eliminated the DLRValue DValue.

- Implemented proactive handling of l-value CastExpS.

- Minor tweak in runtime memory.d .
2009-03-28 05:00:43 +01:00
Tomas Lindquist Olsen
be3bfbff5d Fixed problems introduced by previous commits that prevented Tango from compiling. 2009-03-27 23:17:04 +01:00
Tomas Lindquist Olsen
ec986231e5 Eliminated the need for resolve, declare, const-init and define lists to drive code generation. 2009-03-27 21:50:32 +01:00
Tomas Lindquist Olsen
daef67acc3 Changed use of toObjFile to a new codegen method.
More versioning of DMD specific codegen code.
2009-03-27 17:54:27 +01:00
Tomas Lindquist Olsen
fdecec122a Disabled some extensive LLVM value logging with -vv that dramatically increases -vv output length for little value. 2009-03-03 17:21:35 +01:00
Christian Kamm
0676cf018d Make sure debug info uses the right compilation units - in particular the
current cu if a symbol is a template instance. Fixes #211.
2009-02-14 21:18:47 +01:00
Christian Kamm
789eefd943 Switch some getModule to getCompilationModule to make sure templates are
emitted in the right module.
2009-02-08 18:51:32 +01:00
Tomas Lindquist Olsen
fc480b7fd8 SWITCHED TO LLVM 2.5 !
Applied patch from ticket #129 to compile against latest LLVM. Thanks Frits van Bommel.

Fixed implicit return by asm block at the end of a function on x86-32. Other architectures will produce an error at the moment. Adding support for new targets is fairly simple.

Fixed return calling convention for complex numbers, ST and ST(1) were switched around.

Added some testcases.

I've run a dstress test and there are no regressions. However, the runtime does not seem to compile with symbolic debug information. -O3 -release -inline works well and is what I used for the dstress run. Tango does not compile, a small workaround is needed in tango.io.digest.Digest.Digest.hexDigest. See ticket #206 .
2009-02-08 05:26:54 +01:00
Tomas Lindquist Olsen
9bd52922bd Changed the way LDC determines if a template instantiation needs to get a definition, seems to speed up compile times quite a bit in some cases. 2009-02-04 18:48:03 +01:00
Christian Kamm
12a21b1397 Fix #153. Factor out common code in StructLiteralExp::to(Const)Elem. 2008-12-30 11:42:01 +01:00
Tomas Lindquist Olsen
637c59a422 more moreatatime fixes 2008-12-09 18:45:25 +01:00
Tomas Lindquist Olsen
8ee1fbca26 Fixed a nasty bug with how interface vtables for class initializers were output, causing some class fields to be skipped.
Fixed a problem in definition of ClassInfos where an invalid constant was potentially used. This needs to be looked into proper as it might happen again in the future.
2008-12-01 04:37:54 +01:00
Tomas Lindquist Olsen
577237e073 Changed some hardcoded offset/alignment for classes in DMD, broke offsets for 64bits.
Changed ClassInfo generation to no longer access the default initializer of ClassInfo, fixes problems with index mismatch.
2008-11-30 20:22:09 +01:00
Tomas Lindquist Olsen
5d1366d27f Removed DtoConstFieldInitializer, it's no longer needed and was buggy. 2008-11-29 21:26:50 +01:00
Tomas Lindquist Olsen
4da2cf066e Fixed some problems with the addZeros forward declarations having type mismatches. 2008-11-29 20:57:52 +01:00
Tomas Lindquist Olsen
13e0399ab0 Changed aggregate field initializers to be created lazily, fixes problem with static void arrays in aggregates. 2008-11-29 18:28:17 +01:00
Tomas Lindquist Olsen
f46f865375 Removed KDevelop3 project files, CMake can generate them just fine!
Fixed function literals in static initializers.
Changed alignment of delegates from 2*PTRSIZE to just PTRSIZE.
Changed errors to go to stderr instead of stdout.
Fairly major rewriting of struct/union/class handling, STILL A BIT BUGGY !!!
2008-11-29 21:25:43 +01:00
Christian Kamm
049e24cef8 Error instead of assert when trying to build a default initializer for void[n]. 2008-11-29 12:28:10 +01:00
Tomas Lindquist Olsen
6cf5ca6aba Removed warnings on ignored aligns. Only do aligment on packed structs, align(1) struct Packed { ... }
Changed the way struct/class fields are added, first small part of cleaning up these...
Make struct/class/union fields aware of any anonymous struct/union they might be part of, not yet really useful, but part of getting better union support.
2008-10-28 15:41:09 +01:00
Christian Kamm
4d7af01374 Fix double field toObjFile for structs with AttribDecls. 2008-10-25 22:07:20 +02:00
Tomas Lindquist Olsen
379bd9c330 Fixed weird struct problem from downs, see mini/compile_structs1.d
Rewrote DtoIndexStruct/Class , the old implementation were way too complex for what we really need now - since the DotVar changes.
2008-10-14 15:35:49 +02:00
Tomas Lindquist Olsen
ecd8a2ac07 Support structs that are merely a forward reference. See mini/forwdecl1.d 2008-10-06 14:06:55 +02:00
Tomas Lindquist Olsen
bcafbe169d Wrapped all the most potentially expensive logging calls in a conditional to only do work when actually requested.
Commented some logging calls that could potentially write out many megabytes of type dumps.
2008-10-01 18:32:31 +02:00