kai
5f37ae30cf
LLVM 3.3: class Attributes is renamed to Attribute.
...
Some other renamings took place in "llvm/Attributes.h" but only this causes
compile errors in LDC.
Also uses new location of "llvm/IRBuilder.h".
2012-12-21 17:32:17 +01:00
David Nadlinger
9d9f827efb
Set irtype for underlying function type when building delegate types.
...
This fixes the problem of arg_nest disappearing when DtoType
is called on such types, e.g. as part of metadata generation.
2012-12-21 00:32:07 +01:00
David Nadlinger
ebbbfdd4ac
Metadata/gc2stack compile fixes to accomodate LLVM API changes.
2012-12-20 23:52:24 +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
59a4a02e49
Cleanup: Avoid signed/unsigned comparisons.
...
The ones ones left are for DMD-defined constants.
2012-12-20 01:21:09 +01:00
David Nadlinger
189115fa98
Cleanup: Move definitions for irfuncty.h to new irfuncty.cpp.
2012-12-20 01:03:01 +01:00
David Nadlinger
0cd78dd579
Cleanup: Clang warning fixes.
...
No warnings left on a '-Wall' build except for a single tautological
compare in gen/asm-x86-32.h, which indeed seems like a bug.
2012-12-20 01:00:55 +01:00
David Nadlinger
f68e914da6
Workaround for ICE due to auto return type not being inferred.
...
GitHub: Fixes #217 .
2012-12-19 22:55:18 +01:00
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
David Nadlinger
4512201de5
Removed obsolete IrSymbol class.
2012-12-16 17:19:14 +01:00
David Nadlinger
d5e176484d
Verbose log prettification.
2012-12-08 19:19:08 +01:00
kai
83a7258ae4
Add address space number to getPointerSize() calls.
...
This is required for LLVM 3.2.
2012-10-20 17:49:58 +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
kai
5e03034654
Make LDC compile with LLVM 3.2 again.
2012-09-29 20:51:21 +02:00
David Nadlinger
3eea8de2cf
D1 build fix.
...
Sorry for the breakage, I intended to push the previous change as a pull
request for a CI run, not the main repository.
2012-09-28 02:03:39 +02:00
David Nadlinger
5f6447e52c
Fix GitHub issue #168 – alignment of globals.
2012-09-28 01:57:21 +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
1205e3ea83
Use TargetData to get size of certain types (instead of hard-coded values).
2012-08-25 01:29:42 +02:00
kai
311297b096
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-03 06:32:23 +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
10a0bdf891
More unification work.
2012-07-29 15:19:13 +02:00
kai
e13b115583
More unification work.
2012-07-29 14:22:56 +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
Alexey Prokhin
2f60c4dcda
Codegen the try block before the catches and finally
2012-04-21 22:37:32 +04:00
Alexey Prokhin
bca73ec8b9
Merged dmd 2.059beta
2012-04-05 15:30:00 +04:00
David Nadlinger
26e4f91cdc
Respect struct packing when generating struct initializers.
...
Fixes issue #88 .
Previously, invalid code would be generated in cases like the following:
---
align(1) struct Test {
string str;
int id;
}
Test test = {"asdf", 4};
---
2012-03-16 23:29:10 +01:00
Alexey Prokhin
ae7f0ca7e7
Preliminary vector support
2012-02-16 14:42:23 +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
kai
6726b5da13
Compile LDC2 with VS2010 64bit (LDC changes only).
...
Contains all changes necessary to LDC specific source to compile LDC2 with VS2010. See https://github.com/D-Programming-Language/dmd/pull/516 for necessary changes to DMDFE.
2012-01-11 07:49:21 +01:00
Alexey Prokhin
43057c64ec
Temporary fixes for #60 and #59 until ldc1 frontend is not updated to the latest version
2012-01-10 22:09:22 +04:00
Alexey Prokhin
0ab72a9ef2
Fixed #55 — Illegal instruction
...
Don't artificially set zero-length arrays to dimension 1.
2012-01-10 19:47:28 +04:00
Alexey Prokhin
9889067420
Fixed #53 — Assertion !isaStruct(t)
2012-01-10 19:46:32 +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
91f4e5d015
Added emission of dwarf lexical blocks.
...
Also, dropped support for DISABLE_DEBUG_INFO definition.
2011-12-04 15:34:35 +04:00
kai
a5b3dd29b5
Fixes 2 kinds of warnings.
...
1) The last parameter of getGetElementPtr() has type bool. In some instances, a 2 is used as parameter. This is converted to true.
2) Several loops use int instead of unsigned. This causes warning about signed/unsigned mismatch.
Curiously, only Visual C++ complains about this. Nevertheless I think that the warnings should be fixed.
2011-11-23 19:01:04 +01:00
Alexey Prokhin
7431d58702
Rewritten initialization of global variables.
2011-10-25 15:43:49 +04:00
Alexey Prokhin
0b159f635d
Fix an assert in IrStruct::getClassInfoInterfaces() due to mismatched types
2011-10-25 15:43:49 +04:00
Alexey Prokhin
aee896f85b
Port exceptions to llvm 3.0
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
9a9999854f
Named Return Value Optimization
2011-09-13 21:01:38 +04:00
Alexey Prokhin
0e754b5acd
Merge dmd v2.055
2011-09-13 21:01:32 +04:00
Alexey Prokhin
ed84a21462
Fixed try/finally statements inside another finally
2011-07-22 19:44:16 +04:00
Alexey Prokhin
99f5a73125
Allow nonconstants in associative array initializers
2011-07-19 10:14:15 +04:00
Alexey Prokhin
805fb5cfc1
D2: pass static arrays into functions by value
2011-04-30 15:30:57 +04:00
Alexey Prokhin
f351084089
Fix #408 : Exception not caught for -inline. Thanks, lindquist, for your hint.
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
David Nadlinger
009ce6e161
Avoid switch warning in irtype.cpp.
2011-04-24 11:41:41 +02:00
Kelly Wilson
72ea043124
Recommit klickverbot's patch for LLVM-2.9.
2011-04-20 09:28:37 -06:00