David Nadlinger
8ff3a8060a
Use llvm_unreachable instead of assert(0).
...
Also removed some unused functions.
2013-02-07 03:38:15 +01:00
kai
9081102f24
Use AttrBuilder for LLVM >= 3.2.
...
Due to a misunderstanding of the new semantics of the Attribute(s) class,
this class was used in places where class AttrBuilder should be used.
2013-02-02 15:01:13 +01:00
kai
6cb782791e
Fix build warnings
2013-01-27 00:38:17 +01:00
kai
28e3a4d80f
Replace std::vector with llvm::SmallVector in gen/tollvm.cpp.
2013-01-27 00:13:20 +01:00
kai
b4aca21422
More LLVM 3.3 changes.
...
There is ongoing rework on the AttributeSet class. Also the constructor
of APFloat changed.
2013-01-23 18:22:45 +01:00
kai
82a3216619
Simplify code.
...
The code to generate a constant string is too complex. Just use the
method provided by LLVM.
The complexity was introduced during a LLVM refactoring....
2013-01-04 14:35:24 +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
fd0021c6c2
Cleanup: 2 more clang warning fixes.
2012-12-22 16:59:20 +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
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
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
9458911839
Added LLVM-style license headers to all our files.
2012-12-16 17:19:14 +01:00
David Nadlinger
d5e176484d
Verbose log prettification.
2012-12-08 19:19:08 +01:00
kai
fde625b33d
More changes to the Attributes class in LLVM 3.2.
2012-10-20 17:22:55 +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
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
051cd7302e
Fixed two issues with nested functions as template alias parameters.
...
Fixes #131 (GitHub).
2012-10-07 03:06:07 +02:00
David Nadlinger
da17b7c6b6
Only invoke mustDefineSymbol() once in DtoLinkage.
...
This is, of course, a microoptimization, but more importantly
makes stepping through the code easier.
2012-10-07 00:03:10 +02:00
kai
4ae64dd2e7
Fix size returned by os_critsecsize() and construct type for D_CRITIAL_SECTION on Windows.
2012-09-08 11:49:37 +02:00
Jernej Krempuš
3d108ee684
Fixed a bug in gen/tollvm.cpp.
2012-08-05 18:46:52 +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
bf2aaaca84
More unification work.
2012-07-29 16:13:52 +02:00
David Nadlinger
6f236518b5
Fixes #123 – Linking of pre/post-condition in interface fails when interface implemented in separate module.
2012-06-19 22:37:46 +02:00
kai
48f8ffeb0b
Further changes to compile using MSVC.
2012-05-23 17:36:26 +02:00
Alexey Prokhin
ae7f0ca7e7
Preliminary vector support
2012-02-16 14:42:23 +04:00
Alexey Prokhin
f2ed2e96b0
Use optimized array operators implemented in druntime
2012-02-15 13:16:34 +04:00
Alexey Prokhin
4d3ba3594c
Refactoring: moved ldc specific code from dmd/attrib.c and dmd2/attrib.c into gen/pragma.cpp
2012-02-15 13:16:06 +04:00
Alexey Prokhin
edc4a5f003
DMD Issue 5416 - null should have a type of its own
2011-12-16 20:15:10 +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
629f13929e
WIP: port to llvm 3.0
2011-10-25 15:43:39 +04:00
Alexey Prokhin
99f5a73125
Allow nonconstants in associative array initializers
2011-07-19 10:14:15 +04:00
Alexey Prokhin
73e498ace1
Do not use internal linkage for a function nested in a small function that can be inlined from other modules
2011-04-30 15:30:57 +04:00
Alexey Prokhin
66edce9058
Reverted "Fixed a bunch of ldc1 regressions". Because there is a better way to fix them.
2011-01-06 11:45:38 +03:00
Alexey Prokhin
3a10377c26
Never use InternalLinkage for variables marked as "extern"
2011-01-02 17:38:38 +03:00
Alexey Prokhin
71f653f19b
Fixes for closures
2010-12-15 17:05:16 +03:00
Alexey Prokhin
0b4b009a69
Fixed some unresolved symbols
2010-12-14 14:35:52 +03:00
Alexey Prokhin
6d22dd7999
Updated to 2.050
2010-11-08 16:55:35 +03:00
Alexey Prokhin
360a99caa9
Resolving nested context for structs.
...
* * *
Another fix for nested structs
* * *
Yet another fix for nested structs
2010-11-02 13:21:36 +03:00
Alexey Prokhin
e4c3179d43
Different fixes: phobos compiles now
2010-10-28 14:53:01 +04:00
Alexey Prokhin
4d7a6eda23
Different fixes for d2
2010-10-07 22:35:32 +04:00
Moritz Warning
c151d37365
fixes #434 :: add llvm 2.8 support
2010-10-23 13:38:26 +02:00
Moritz Warning
3dcfb04ad7
fix for FreeBSD
2010-06-09 23:16:00 +02: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
Matti Niemenmaa
68daadf53c
Add -linkonce-templates for emitting linkonce_odr syms instead of weak_odr.
2010-03-09 23:07:08 +02:00
Robert Clipsham
70b2156010
Fixed a segfault in ldc2 when compiling synchronized{} blocks.
2009-09-19 13:05:10 +01:00
Robert Clipsham
089e792258
DMD 2.032 Merge.
2009-09-08 10:07:56 +01:00
Benjamin Kramer
d24643bb50
Avoid some unecessary heap allocations by using llvm's StringRef class.
2009-08-14 01:43:30 +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