Commit graph

214 commits

Author SHA1 Message Date
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
1ba0681197 2nd attempt to fix issue #253. 2012-12-21 22:45:09 +01:00
kai
df4a245040 Resolve mismatch between object.di and typinfo.cpp on 64bit non-x86 systems.
On Windows x86_64, class TypeInfo_Struct contains 2 additional fields
(m_arg1/m_arg2) which are used for the X86_64 System V ABI varargs
implementation. They are not present on any other os.

This commit changes an assertion which did not check for the os and therefore
broke on 64bit non-86 systems like ppc64.
2012-12-21 22:05:28 +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
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
540888d6d0 Removed tautological #if block. 2012-11-11 00:32:15 +01:00
David Nadlinger
c6abdcf4a4 Don't set TypePointer::isunsigned to true in the frontend.
The previous solution was problematic because the change was language-
visble via the isUnsigned trait. Now, pointers are simply explicitly
checked for in the relevant places. (Note that there might be cases in
the diff where a direct isunsigned() call would have been appropriate –
I only checked for instances where the type clearly cannot be a pointer,
but chose to go the safe route in replicating existing behavior
otherwise).

Fixes DMD testcase 'traits'.
2012-09-28 00:28:49 +02:00
David Nadlinger
4ae14449ea Emit new TypeInfo layout.
Includes untested support for RTInfo.
2012-09-07 03:51:32 +02:00
David Nadlinger
8ebd2ce5a6 More CRLF->LF line ending conversion. 2012-09-07 03:51:32 +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
Alexey Prokhin
07bf68afa3 DMD Issue 5590 - Regression(2.036) ICE(e2ir.c): when using .values on enum which is associative array 2012-04-21 22:37:36 +04:00
Alexey Prokhin
ae7f0ca7e7 Preliminary vector support 2012-02-16 14:42:23 +04:00
Alexey Prokhin
e74e55df89 Merge 2.058beta 2012-02-15 13:23:16 +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
8b50928636 Fixed #37 — ICE: llvm::GlobalVariable::setInitializer assert failed 2011-12-06 13:55:01 +04:00
David Nadlinger
fe19ee84f5 Merge branch 'llvm3.0' into merge-3.0
Conflicts:
	gen/configfile.cpp
2011-12-04 18:16:36 +01: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
David Nadlinger
ffe37c4a62 Merge remote-tracking branch 'upstream/llvm3.0' 2011-11-12 19:51:30 +01:00
Alexey Prokhin
b52c224d57 Merge v2.056 2011-11-01 11:44:03 +04:00
Alexey Prokhin
629f13929e WIP: port to llvm 3.0 2011-10-25 15:43:39 +04:00
Alexey Prokhin
06baaacdc0 Fixed an undefined reference if a postblit is annotated with @disabled 2011-07-19 20:20:00 +04:00
Alexey Prokhin
596aad3738 DMD issue 3086 - TypeInfo opEquals returns incorrect results 2011-07-19 10:14:13 +04:00
Alexey Prokhin
069f0a6262 Merged changes in TypeDArray::builtinTypeInfo() from dmdfe. 2011-04-30 15:30:57 +04:00
Alexey Prokhin
e921998d75 A few fixes for 64bit 2011-02-23 12:49:57 +03:00
Alexey Prokhin
02b307c0e9 Detect circular definition of typedef's 2011-01-04 20:03:29 +03:00
Alexey Prokhin
4bd0f2fadc Fixed generating of typeinfo for structs. 2010-12-30 14:04:24 +03:00
Alexey Prokhin
48d89916ef Work on typeinfo. 2010-12-19 15:50:44 +03:00
Alexey Prokhin
6d22dd7999 Updated to 2.050 2010-11-08 16:55:35 +03:00
Alexey Prokhin
4d7a6eda23 Different fixes for d2 2010-10-07 22:35:32 +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
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
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
Tomas Lindquist Olsen
b7b671ce48 Disable metadata for typeid(void). 2009-07-31 01:44:47 +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
51c02d192a Some minor cleanups
* remove an #ifdef USE_METADATA I accidently left in
* remove now unneeded llvm-version includes
* fix indentation in metadata.h
* prevent the "Found native target" message from interrupting ccmake
2009-07-20 18:16:11 +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
Frits van Bommel
96fdcd6347 Run semantic3 on imported modules, and emit new symbols with
`available_externally` linkage. This allows the inliner to inline functions from
other modules while telling the code generator to ignore those functions (treat
them as declarations)
Still generates a few extra `TypeInfo`s and strings...
Disabled when generating debug info because I don't really understand it, and it
doesn't like this.
2009-06-07 16:00:13 +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
Robert Clipsham
c5be82c5ae LDC 2 compiles again. 2009-05-30 17:23:32 +01:00