Kai Nacke
6ca3d730ae
Do not construct Ir-Types twice for the same type.
...
This is the same as in PR #1269 . The Ir-Types may be initialized
twice (due to pointers, forward references etc.).
This commit fixes hopefully all instances of this problem, using
the same approach in each factory function.
This fixes issue #1112 .
2016-02-01 21:52:15 +01:00
David Nadlinger
34b03b51a5
irtype: Slightly clarify comment explaining IrType mapping
2016-01-30 20:26:11 +01:00
David Nadlinger
01efbeb5f0
irtype: Structure sarray code the same as for arrays and pointers
2016-01-30 20:19:44 +01:00
Kai Nacke
bf31921a87
Do not construct IrTypeSArray twice for same type.
...
The constructor of IrTypeSArray() calls sarray2llvm(). This function calls
DtoMemType() which may recursively try to construct another IrTypeSArray
for the same type. To prevent this the call to sarray2llvm() is moved
out
of the constructor into the factory method and an explicit check is added.
This fixes issue #1266 .
2016-01-30 16:24:46 +01:00
David Nadlinger
9df487edff
gen/ir: clang-tidy the world
2015-11-02 11:30:40 +02:00
David Nadlinger
44b0f7b615
driver/gen/ir: clang-format the world
...
This uses the LLVM style, which makes sense for sharing code
with other LLVM projects. The DMD code we use will soon all
be in D anyway.
2015-11-02 00:28:01 +02:00
Martin
52532985a9
IR source directory: use C++11 inline-initialization in headers
2015-11-01 19:30:04 +01:00
Alexey Prokhin
4e2d45a409
Move irFty fields to backend ir classes
2014-10-05 16:55:22 +04:00
David Nadlinger
cb341586e3
First merge of 2.064 beta.
...
This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb.
Doesn't build Phobos yet.
2013-10-29 19:21:15 +01:00
David Nadlinger
7dff0bbe4b
Fix IrType::isVector (so far unused anyway).
2013-10-13 01:00:24 +02:00
David Nadlinger
f2f3c751b3
Renamed IrStruct to IrAggr, as it is also used for classes.
...
The class-specific parts should probably be factored out.
2013-06-12 17:16:35 +02:00
David Nadlinger
e0d78ef0e3
Make irtype.h compile without needing other includes first.
2013-06-12 17:15:55 +02:00
David Nadlinger
b49cbeaaf1
Factored out struct initializer constant generation.
2013-05-17 01:02:02 +02:00
David Nadlinger
f57eac796f
Expand on IrType::get rationale.
2013-05-15 20:19:44 +02:00
kai
1e4a8fffc2
Remove DMDV1 and DMDV2.
2013-03-06 10:20:24 +01:00
kai
a11459bc31
"The Great Renaming" continues.
...
More changes to match the renamed files of LLVM 3.3.
2013-01-06 17:17:30 +01:00
David Nadlinger
eac742b9f7
Don't create IrType twice for aggregate arrays with forward references.
...
GitHub: Fixes #257 .
2012-12-27 23:22:46 +01:00
David Nadlinger
a3a511ca55
Refactored IrType construction to use static get() method.
...
This also allows us to enable the assert in IrType::IrType.
Unfortunately, this is mostly a "peace of mind" commit, there
doesn't seem to have been a bug actually caused by the transitory
duplicate IrTypePointer/IrTypeStruct instances.
The remaining xyz2llvm static methods are not exactly pretty,
they should probably just be folded into get.
2012-12-20 23:52:09 +01:00
David Nadlinger
464c695814
Renamed IrType::get/IrType::getD, treat classes as the special case they are.
2012-12-20 23:52:09 +01:00
David Nadlinger
9458911839
Added LLVM-style license headers to all our files.
2012-12-16 17:19:14 +01:00
Alexey Prokhin
ae7f0ca7e7
Preliminary vector support
2012-02-16 14:42:23 +04:00
Alexey Prokhin
edc4a5f003
DMD Issue 5416 - null should have a type of its own
2011-12-16 20:15:10 +04:00
Alexey Prokhin
629f13929e
WIP: port to llvm 3.0
2011-10-25 15:43:39 +04:00
Tomas Lindquist Olsen
9beb33770f
Fixed previous aggregate initZ alignment.
...
Added missing IrType::isDelegate method.
2009-05-16 18:37:16 +02:00
Tomas Lindquist Olsen
c0f2af5afd
Added IrTypeFunction and IrTypeDelegate and eliminated IrDType. This means the Type::ir field can be removed. It's the final part needed for the move to a slightly more sane type system. Now the whole thing just needs to be cleaned up :P
...
Added -v-cg switch, which right now just prints "codegen: module.name (module/name.d)" to stdout, this can really help figuring out where, in some complex build command, things go wrong.
2009-05-16 18:19:52 +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
9c4b2b4036
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
2009-04-03 16:34:11 +02:00
Tomas Lindquist Olsen
c6e9f7f9e2
Moved ir/irtype.* into ir/irdtype.*.
...
Renamed IrType to IrDType, analogous to IrDSymbol.
2009-03-31 20:21:28 +02: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
a3a418150e
Some missed LLVMDC -> LDC.
2008-10-06 22:54:08 +02:00
Tomas Lindquist Olsen
2317c6fd39
[svn r210] Fixed: last commit was broken.
2008-05-12 18:48:09 +02:00
Tomas Lindquist Olsen
9f3be435b0
[svn r209] Fixed: exotic array to pointer casts were broken.
...
Changed: classes now have opaque vtables.
2008-05-12 18:44:11 +02:00
Christian Kamm
0fba6312c2
[svn r189] moving IR data back into DMD frontend nodes
2008-05-06 07:56:03 +02:00
Christian Kamm
4cd137f9d4
[svn r174] added file missing from previous commit [173]
2008-05-01 13:33:02 +02:00