Alexey Prokhin
8fea7484fe
Don't use TypeFunction::funcdecl as it is about to be removed
2013-10-05 19:04:18 +04:00
Alexey Prokhin
b819975c84
Eliminate the need for TypeFunction::funcdecl
2013-10-05 19:03:03 +04:00
kai
967b986629
Fix for issue #430
2013-08-05 21:36:02 +02: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
407f45b07d
Extend IRLandingPad to support arbitrary finally blocks.
...
Just laying down the ground work before fixing issue 426.
2013-07-10 13:34:16 +04:00
Alexey Prokhin
90bb32d2d8
extern(C++) interfaces
2013-06-22 17:33:00 +04:00
Alexey Prokhin
09c471ae74
Properly implement exception chaining
2013-06-18 17:06:00 +04:00
Alexey Prokhin
49f8cfe99e
Fixed codegen of nested try-catch-finally blocks
2013-06-18 14:16:51 +04:00
David Nadlinger
1215ffacd3
Complete IrStruct->IrAggr rename.
2013-06-17 13:14:15 +02:00
David Nadlinger
9700d84132
Initialize IrTypeAggr members in order to silence warning.
2013-06-17 02:38:38 +02:00
David Nadlinger
dd8652768c
Remove unused IrTypeFunction::fty().
...
The design split between IrFuncTy/IrTypeFunction might need
a review at some point.
2013-06-17 02:37:55 +02:00
David Nadlinger
cfd5c052fe
Fix LLVM 3.1 build.
2013-06-16 20:49:23 +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
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
c813ccdcf7
Small debug diagnostics improvements.
2013-06-15 15:04:48 +02:00
David Nadlinger
eb14970fd0
Minor nested context doc comment improval.
2013-06-14 17:10:50 +02:00
David Nadlinger
292caa1438
Merge the 2.063 frontend.
2013-06-12 20:16:37 +02:00
David Nadlinger
9a016a1002
Refactor struct initializers codegen.
...
This not only reduces code duplication, but the unification
also enables code a la StructLiteralExp to handle classes
(for CTFE class constant support in 2.063).
2013-06-12 20:16:05 +02:00
David Nadlinger
2cebe6408c
Divided ir/irtypestruct.* in general aggregate and struct specific part.
...
This is just to improve clarity, as it was rather non-obvious
what of the code also applied to classes before.
IrTypeAggr::createInitializerConstant would currently belong in
IrTypeStruct, but this will be refactored anyway.
2013-06-12 17:17:09 +02:00
David Nadlinger
abc6c147dc
Fix potential latent struct initialization bug.
...
Apparently the initializer array never was actually
unsorted so far.
2013-06-12 17:16:52 +02:00
David Nadlinger
55d7fc708e
Remove leftover declaration.
2013-06-12 17:16:39 +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
848dee32d4
Store bools as i8.
...
I really hope we can refactor this to use a less leaky
abstraction later – it should at least be possible to merge
voidToI8 and i1ToI8.
2013-06-07 03:20:54 +02:00
David Nadlinger
c7c1c25f15
DValue: struct->class.
...
This is in line with an incoming upstream change making all
polymorphic structs classes, and also matches common coding
conventions.
2013-06-07 03:20:39 +02:00
David Nadlinger
43e27d0dd1
Remove USE_METADATA.
...
It has been on by default for quite some time now.
2013-06-07 02:48:53 +02:00
David Nadlinger
87c8a96545
Check initializer type size in IrStruct::getDefaultInit().
2013-05-19 20:25:16 +02:00
David Nadlinger
7b435c2c87
Unify handling of struct initializers.
...
GitHub: Fixes #351 .
2013-05-18 19:51:37 +02:00
David Nadlinger
b49cbeaaf1
Factored out struct initializer constant generation.
2013-05-17 01:02:02 +02:00
David Nadlinger
beed5c3044
Get rid of empty IrBase class.
...
It isn't useful in any way now that the GC is out of the
picture, and the existance of a "dummy" toChars() method is
annoying when debugging.
2013-05-15 20:28:53 +02:00
David Nadlinger
f57eac796f
Expand on IrType::get rationale.
2013-05-15 20:19:44 +02:00
David Nadlinger
f894a7809c
Update catch landingpad codegen to match latest druntime change.
2013-05-11 23:29:39 +02:00
kai
1e4a8fffc2
Remove DMDV1 and DMDV2.
2013-03-06 10:20:24 +01:00
David Nadlinger
0a96aea868
Sort includes according to style guidelines:
...
1. Main include corresponding to .cpp file, if any.
2. DMD and LDC includes.
3. LLVM includes.
4. System includes.
Also updated a few include guards to match the default format.
2013-02-07 21:20:55 +01:00
David Nadlinger
5616753768
Consistently use quotes for LLVM includes.
2013-02-07 21:20:54 +01:00
David Nadlinger
5f3ba41574
Removed redundant global.params.cpu field.
...
Now that we have global.params.targetTriple, the information
is only duplicated.
2013-02-07 17:36:54 +01:00
David Nadlinger
8ff3a8060a
Use llvm_unreachable instead of assert(0).
...
Also removed some unused functions.
2013-02-07 03:38:15 +01:00
kai
104cd77e9c
Merge branch 'master' into merge-2.061-2
2013-02-03 15:50:39 +01:00
kai
f806ec0ed5
Attribute holds no longer multiple values in LLVM 3.3.
...
The solution is to replace Attribute with AttrBuilder in IrFuncTyArg.
Then the argument attributes can be easily manipulated and transformed
into the final AttributeSet.
2013-02-03 15:09:36 +01:00
kai
bfc23acf30
Merge branch 'master' into merge-2.061-2
2013-02-02 15:27:51 +01:00
kai
045d50deb5
Replace SmallVector/vector with C array for type lists
2013-02-02 15:01:13 +01:00
David Nadlinger
30caa4bfe6
Merge branch 'master' into merge-2.061-2
2013-01-12 01:27:02 +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
1a3fc9f97f
Fix break out of non-nothrow range foreach.
...
Fixes DMD testcase 'test9068'.
2013-01-04 16:48:10 +01:00
David Nadlinger
a797e686a0
Updated hidden method error message according to DMD issue 6373.
...
Fixes DMD testcase 'diag6373'.
2013-01-04 07:31:17 +01:00
David Nadlinger
b3f59134c1
Adapt to new DMD lambda inference mechanism.
...
Rewriting types this late is a questionable design and prone
to break non-DMD client code; this should be discussed
again with Kenji.
2013-01-04 06:22:57 +01:00
kai
272e7b7a55
Follow "The Great Renaming" in LLVM 3.3
...
This time VMCore was renamed to IR. Several top level include
files were moved to new subfolder IR.
2013-01-03 08:52:23 +01:00
kai
2898e5cac3
Add support for PPC 128bit doubledouble type.
...
On a PowerPC target the datatype real is mapped to PPC 128bit doubledouble type.
Please note that this yet does not work if you cross compile from a different
architecture.
2012-12-30 17:18:36 +01:00
kai
a3975b7f47
Replace llvm::Function.getFnAttributes with llvm::Function.getAttributes.
...
This is a recent change in LLVM 3.3.
2012-12-30 14:27:51 +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