David Nadlinger
8ff3a8060a
Use llvm_unreachable instead of assert(0).
...
Also removed some unused functions.
2013-02-07 03:38:15 +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
fffb23f7ce
Replace AttributeWithIndex for LLVM 3.3.
...
The helper class AttribteWithIndex is gone in LLVM 3.3. Instead a
combination of AttrBuilder and AttributeSet must be used.
2013-02-02 22:04:19 +01:00
kai
145e1b5b24
AttributeSet::get(... AttributeWithIndex ...) is now private.
...
AttributeWithIndex is really going away in LLVM 3.3. This is a
horrible hack to keep everything compiling. Attribute handling
needs some rework.
2013-01-28 19:20:57 +01:00
David Nadlinger
1caf4c9c26
Handle plain AA type <-> AA struct return type mismatch.
...
GitHub: Fixes #214 .
2012-12-31 12:10:46 +01:00
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
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
2988bc46e0
Removed long obsolete (and broken) LLVM IR annotation code.
...
If someone wants to redo this properly, an idea that actually works
would be to use a custom llvm::AssemblyAnnotationWriter.
2012-12-19 01:50:48 +01:00
David Nadlinger
9458911839
Added LLVM-style license headers to all our files.
2012-12-16 17:19:14 +01:00
kai
1a06130cfa
AttrListPtr is renamed to AttributeSet in LLVM 3.3.
2012-12-09 19:48:39 +01:00
David Nadlinger
19f570bcb9
AttrListPtr also requires the context arg in LLVM 3.2 now.
2012-11-24 12:40:12 +01:00
kai
2fec23b84e
AttrlistPtr::get() now requires context as first argument.
...
This is the first LLVM 3.3 related change.
2012-11-21 22:10:26 +01:00
David Nadlinger
07888f95e4
D1: Fixed accessing parameters in contracts.
...
This reverts the changes from commit f7e5245
and implements the
proper fix – in D1, contracts are treated as normal nested functions.
GitHub: Fix #138 .
2012-10-21 01:11:04 +02:00
kai
657fc42221
And still more changes for LLVM 3.2
...
There were additional changes to the Attributes class.
2012-10-15 18:31:18 +02:00
kai
fb108eed12
More LLVM 3.2 changes.
2012-10-14 18:45:31 +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
3f9f13594c
Work around unmerged types being returned from frontend.
...
Fixes DMD testcase 'funclit'.
2012-09-27 23:50:52 +02:00
David Nadlinger
bebc5cce28
Workaround for Voldemort return type handling issues.
...
See the comment in DtoCallFunction for an explanation of what is
going on.
The struct zero initialization code was also refactored out to
AssignExp::toElem and modified so that it is only triggered
on integer->struct assignments, not for any types where the
modifier-stripped types don't match up. This would have lead to
silently wrong code in the cases where the assert would have been
triggered otherwise.
Fixes the Phobos testsuite build.
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
f7e5245e03
Fix #138 – in precondition of methods broken in D1.
...
Not sure why the code was special-cased for D2 in the first place –
are there any cases where we expect a »full« context struct in the
contracts for D1. At least, they don't occur in DStress/Tango/….
As a general note, this is one of many bugs which would have not gone
unnoticed if we didn't use so many bitcasts.
2012-07-13 11:38:56 +02:00
Alexey Prokhin
bca73ec8b9
Merged dmd 2.059beta
2012-04-05 15:30:00 +04:00
Alexey Prokhin
8df15e7b64
Fixed #75 — "unhandled repainting of return value" with static array of consts
2012-02-15 13:23:23 +04:00
Alexey Prokhin
e74e55df89
Merge 2.058beta
2012-02-15 13:23:16 +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
b41688a0b8
DMD Issue 6859 - Segfault when abstract method uses with contract.
2011-12-16 20:15:31 +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
805fb5cfc1
D2: pass static arrays into functions by value
2011-04-30 15:30:57 +04:00
Alexey Prokhin
1653abbbc9
Use StdCall calling convention on X86_64
2011-02-25 22:29:40 +03:00
Alexey Prokhin
5fb97f3d3f
Fix argument types of dvariadic functions
2011-02-25 22:28:59 +03:00
Alexey Prokhin
e921998d75
A few fixes for 64bit
2011-02-23 12:49:57 +03:00
Alexey Prokhin
6d89bfa961
Use _d_assocarrayliteralTX to initialize associative arrays. Replace depricated _d_arrayappendcT() by _d_arrayappendcTX(). Make sure that a l-value of a binassign expressions is only evaluated once (reapllied 1784 but only for D2)
2011-02-20 19:00:45 +03:00
Alexey Prokhin
8790958712
pascal calling convention
2010-12-17 12:59:59 +03:00
Alexey Prokhin
eccd26ac93
Fixed crashes when compiling interpret test.
2010-12-17 12:55:28 +03:00
Alexey Prokhin
e48d0f6b79
Fixed test runnable/arrayop
2010-12-14 14:38:46 +03:00
Alexey Prokhin
e4c3179d43
Different fixes: phobos compiles now
2010-10-28 14:53:01 +04:00
Alexey Prokhin
b1e5993873
Started work on phobos
2010-10-27 18:13:46 +04:00
Alexey Prokhin
df87607ba2
Updated to 2.049
2010-09-30 21:54:45 +04:00
Alexey Prokhin
93ddf8112b
Fixed compilation of ldc2
2010-09-28 20:51:27 +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
Leandro Lucarella
357dc9c1a9
Merge DMD r253: refactor: Argument => Parameter
...
---
dmd/arrayop.c | 30 ++++----
dmd/arraytypes.h | 2 +-
dmd/class.c | 8 +-
dmd/declaration.c | 10 ++--
dmd/declaration.h | 16 ++--
dmd/doc.c | 12 ++--
dmd/dsymbol.c | 4 +-
dmd/expression.c | 48 +++++++-------
dmd/expression.h | 32 +++++-----
dmd/func.c | 78 +++++++++++-----------
dmd/init.c | 2 +-
dmd/interpret.c | 8 +-
dmd/mtype.c | 190 ++++++++++++++++++++++++++--------------------------
dmd/mtype.h | 32 +++++-----
dmd/opover.c | 34 +++++-----
dmd/parse.c | 40 ++++++------
dmd/parse.h | 2 +-
dmd/statement.c | 90 +++++++++++++-------------
dmd/statement.h | 14 ++--
dmd/struct.c | 8 +-
dmd/template.c | 30 ++++----
gen/functions.cpp | 10 ++--
gen/functions.h | 2 +-
gen/tocall.cpp | 10 ++--
gen/typinf.cpp | 6 +-
25 files changed, 359 insertions(+), 359 deletions(-)
2010-01-06 15:18:20 -03: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
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
Christian Kamm
756a2cb2a1
Adjust LDC to work with the LLVMContext LLVM changes.
...
This means we now require a fairly new LLVM revision. I use 75234.
2009-07-10 21:30:02 +02:00
Tomas Lindquist Olsen
f6997cb604
D2:
...
Applied function type from D1 frontend that got removed in D2, it's critical for member function type to be correct.
Fixed a bunch of type discrepancies in druntime object.di vs. genobj.d .
Disabled (#if 0) some potentally very large type dumps for -vv .
Updated classinfo and typeinfo generation for D2, almost complete now.
Added finer grained checks for vtbl type mismatching, aids debugging.
2009-06-03 02:28:48 +02:00