Commit graph

150 commits

Author SHA1 Message Date
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
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
ebbbfdd4ac Metadata/gc2stack compile fixes to accomodate LLVM API changes. 2012-12-20 23:52:24 +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
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
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
629f13929e WIP: port to llvm 3.0 2011-10-25 15:43:39 +04:00
Alexey Prokhin
0e754b5acd Merge dmd v2.055 2011-09-13 21:01:32 +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
Alexey Prokhin
f0a183f0e8 Fix a crash when compiling a file which contains an immutable class declaration 2011-02-20 19:00:53 +03:00
Alexey Prokhin
6b6ba75139 Call _d_hidden_func() instead of hidden functions. 2010-12-31 13:29:01 +03:00
Alexey Prokhin
fd73072371 Fixed undefined references to methods without body. 2010-11-02 20:10:52 +03:00
Alexey Prokhin
4d7a6eda23 Different fixes for d2 2010-10-07 22:35:32 +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
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
Tomas Lindquist Olsen
c69e5a5c83 Fixed compiling with llvm rev > 77732 2009-08-01 18:23:52 +02:00
Benjamin Kramer
a75873da1c MDNode left the Context!
The changes are in #if LLVM_REV >= 77733 to make the dstress bot happy.
2009-07-31 23:53:06 +02:00
Tomas Lindquist Olsen
d5d3ecdb05 Added back option to disable metadata generation and users. Set USE_METADATA to OFF in ccmake. 2009-07-31 11:28:31 +02:00
Benjamin Kramer
e34f07505b use the new NamedMDNode class
this will need a LLVM >= r77619
2009-07-30 20:54:03 +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
Benjamin Kramer
8576788245 Get rid of USE_METADATA 2009-07-11 14:19:21 +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
Frits van Bommel
cf5ad1a5b0 Remove some unnecessary #ifs. The D1 frontend has a Type::nextOf() which just
returns `next`.
2009-06-02 18:41:10 +02:00
Robert Clipsham
91ddf6140a More tweaks. 2009-06-01 18:58:21 +01:00
Robert Clipsham
c5be82c5ae LDC 2 compiles again. 2009-05-30 17:23:32 +01:00
Christian Kamm
f675d36cfb Tentative fix for semantic3 on imported modules and unnecessary template
function definition issue. Please test!
Also change linkage of __interfaceInfos to external (same as __Class, __vtbl,
__init). The other change might make this superfluous.
2009-05-21 10:56:04 +02:00
Tomas Lindquist Olsen
b147ecc66d Initial (but disabled) fix for ticket #294 , the actual part that fixes the bug is in a #if 0 block as I'm afraid it will cause regressions. I'm most likely not going to be around tonight, and maybe not tomorrow as well, so I'm pushing it in case someone wants to run some serious testing/investigate the problem noted in llvmhelpers.cpp : realignOffset . 2009-05-14 17:20:17 +02:00
Frits van Bommel
49a2924823 Update for metadata changes in LLVM trunk. 2009-05-11 11:59:22 +02:00
Frits van Bommel
5b82f780f8 Allocate objects on the stack if they (a) don't have a destructor, and
(b) don't override the delete operator (on top of the regular conditions for
stack allocation that also apply to arrays, structs, etc.).
The "no destructor" clause is not strictly necessary, but calling them at the
right time would be tricky to say the least; it would involve, among other
things, "manually" inserting a try-finally block around anything that might
throw exceptions not caught in the current function.

Note: objects with custom new operators are automatically ignored because they
don't use the regular allocation runtime call, so there's no need to pay special
attention to them.
2009-05-09 00:50:15 +02:00
Tomas Lindquist Olsen
617861ead4 Fixed file name in imported mixins containing assertions. 2009-04-29 18:39:59 +02:00
Tomas Lindquist Olsen
ba38e15f0d Fixed class default initializers and type generation. Bug #260 is fixed. 2009-04-27 03:40:40 +02:00
Tomas Lindquist Olsen
73f93d7240 Merge 2009-04-25 18:27:11 +02:00
Tomas Lindquist Olsen
3e882d422b Fixed struct default initializers. 2009-04-25 18:26:54 +02:00
Christian Kamm
8916f783b7 Revert change to treat bodyless functions in abstract classes as abstract.
See DMD bug 2894.
2009-04-25 09:11:32 +02:00
Tomas Lindquist Olsen
575038bfbd Fixed classinfo.interfaces for .. interfaces! 2009-04-21 20:19:53 +02:00
Christian Kamm
522c580647 Do not emit declare or emit a vtbl entry for bodyless functions in abstract classes.
Maybe the better fix would be to adjust FuncDeclaration::isAbstract, but there
may be unwelcome sideeffects.
2009-04-19 00:06:23 +02:00
Tomas Lindquist Olsen
c7936c2ace !ClassInfo instances were not mutable, this is necessary for .classinfo based locking to work. !ModuleInfo generation was commented out as well. 2009-04-17 00:54:20 +02:00
Tomas Lindquist Olsen
948202a1a1 Fixed ClassInfo.interfaces. mini/s.d now runs again. 2009-04-16 21:10:51 +02:00
Tomas Lindquist Olsen
0521f8075c Too strict assertion with generating the interfaceInfosZ symbol. Baseclasses might introduce interfaces. 2009-04-16 21:00:49 +02:00
Tomas Lindquist Olsen
9a86f9c0b5 Fixed some minitest regressions. 2009-04-16 19:21:30 +02:00
Tomas Lindquist Olsen
5db458d8da Completed interface implementation. Hopefully that's it for now.. 2009-04-16 13:18:56 +02:00
Tomas Lindquist Olsen
bb98d68f64 Now compiles again, and fixed type of the Interface[N] ClassInfo symbol. 2009-04-16 11:01:49 +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