Tomas Lindquist Olsen
b7b671ce48
Disable metadata for typeid(void).
2009-07-31 01:44:47 +02:00
Benjamin Kramer
652a4b39c0
ConstantAggregateZero moved back to LLVM 2.5-style API
...
Requires LLVM >= 77635
2009-07-31 01:16:30 +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
3f0a0686a8
Value::getNameStart and Value::getNameLength were removed
2009-07-23 20:34:35 +02:00
Benjamin Kramer
a31f3eb98f
getClosestStaticTargetForModule was replaced with lookupTarget
...
Build fix for LLVM r77111.
2009-07-28 15:26:21 +02:00
Benjamin Kramer
27a9f93767
DOUT is deprecated, use DEBUG(errs()) instead
2009-07-27 11:44:01 +02:00
Tomas Lindquist Olsen
3cf7b6a95c
Fixed potential crash with complex recursive struct types.
2009-07-26 19:12:37 +02:00
Christian Kamm
987618fcd1
Always emit a stop point for return statements - even for void returns.
2009-07-26 18:32:25 +02:00
Benjamin Kramer
a398cd39b3
ConstantInt::get{True,False} moved to LLVMContext
...
Non-breaking build fix for LLVM r76533. Also fixes a context related
bug in GarbageCollect2Stack.
2009-07-21 13:11:39 +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
69171c07cd
Temporarily force our LLVMContext to the global context
...
From llvm r75846:
"To simplify the upcoming context-on-type change, switch all command
line tools to using the default global context for now."
2009-07-20 17:55:05 +02:00
Benjamin Kramer
d7049de966
More factory methods moved to LLVMContext
2009-07-15 18:09:41 +02:00
Benjamin Kramer
ac5bd294ca
We need to parse mArch ourselves now
...
Build fix for LLVM r75890
2009-07-17 19:23:20 +02:00
Benjamin Kramer
7359448063
Use TargetRegistry instead of TargetMachineRegistry for Target lookups
...
This fixes the build for LLVM >= r75774 and will probably break older
LLVM revs.
2009-07-15 23:01:51 +02:00
Benjamin Kramer
03020aea39
raw_fd_ostream takes a force parameter now
...
Build fix for LLVM 75801.
2009-07-15 20:04:42 +02:00
Benjamin Kramer
23b83c4d7b
Target.addPassesToEmitFile takes a formatted_raw_ostream now
...
Build fix for LLVM r75670
2009-07-14 23:06:31 +02:00
Robert Clipsham
02e7bb26fc
Fixed Op_Shift asm instructions on x86-64.
2009-07-19 23:52:07 +01:00
Benjamin Kramer
076ef17159
Build fix for LLVM r75546 and r75559
2009-07-14 02:19:05 +02:00
Christian Kamm
0075194b90
Improve error message when using auto declarations with explicit type.
2009-07-14 18:24:40 +02:00
Christian Kamm
eb3cd8872e
Change back the ldc.conf search path and add ~/.ldc
...
New one:
cwd, ~/.ldc, prefix/etc, prefix/etc/ldc, /etc, /etc/ldc, next-to-binary
2009-07-13 22:56:59 +02:00
Christian Kamm
919f8d6bfa
Check for ldc.conf next to the ldc binary before home and etc.
...
The new search order is
* current working directory
* next to executable
* user home directory
* prefix/etc
* prefix/etc/ldc
* /etc
* /etc/ldc
2009-07-13 22:24:12 +02:00
Benjamin Kramer
0ee2f34611
Don't use llvm::getGlobalContext() anymore
2009-07-13 20:16:15 +02:00
Benjamin Kramer
331319dab1
Build fix for the latest LLVMContext changes (LLVM r75445)
...
This shouldn't break the build with older LLVM revs. We include
LLVMContext.h in gen/llvm.h now to make the transition a little bit
easier.
2009-07-13 12:17:58 +02:00
Benjamin Kramer
8576788245
Get rid of USE_METADATA
2009-07-11 14:19:21 +02:00
Benjamin Kramer
45f7401a5b
Remove all of the now unecessary #if LLVM_REV
2009-07-11 14:09:33 +02:00
Benjamin Kramer
917bd7b901
Remove duplicated code
...
This was implemented for windows in llvm r73379
2009-07-11 13:58:23 +02:00
Christian Kamm
72d1f1e6dd
Make the auto storage class never have the same meaning as scope.
...
This changes the meaning of
auto class MyClass {} and
auto MyClass ident;
Both have been made an error to prevent accidents.
2009-07-12 16:15: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
Robert Clipsham
c4c38715ef
Updated default ldc2 configuration file.
2009-07-09 21:13:19 +01:00
Robert Clipsham
4fbcd9b9c4
A couple of ldc2 tweaks now druntime compiles.
2009-07-09 12:36:08 +01:00
Robert Clipsham
b73e45940a
Merged dmdfe 2.031.
2009-07-07 02:26:11 +01:00
Robert Clipsham
e5b7c25597
Removed druntime from the repository.
...
Updated .hgignore to ignore druntime.
2009-07-06 23:57:27 +01:00
Robert Clipsham
951e961f9e
Merge.
2009-07-06 23:56:11 +01:00
Robert Clipsham
1812c5b00a
Fixed some unmerged parts of the D2 frontend.
...
Removed the automatic linker flags for D2 (temp).
Renamed a runtime function for D2.
2009-07-06 23:54:02 +01:00
Christian Kamm
feaefc3314
Better error handling for CMake LLVM config file detection.
2009-07-03 18:49:42 +02:00
Benjamin Kramer
22b36384b0
Fix build for LLVM >= r74640
...
Some LLVM objects now take a 'Context' to make multi-threaded apps easier.
Since we're not multi-threaded it's safe to use llvm::getGlobalContext()
which gives us the same behavior as we had before.
2009-07-03 17:24:35 +02:00
Christian Kamm
151e266deb
Yet another fix for finding llvm's config file.
...
Since llvm-config --includedir sometimes includes the trailing llvm/ and
sometimes it doesn't, we just check both directories.
2009-06-30 22:07:50 +02:00
Christian Kamm
81e0b81e10
LLVM_INSTDIR -> LLVM_INCLUDEDIR fix by d0k.
2009-06-29 21:44:11 +02:00
Christian Kamm
88f6e9e83a
Initialize LLVM target and asmprinter for the native and extra targets.
...
Uses some CMake hackery to get the native LLVM target name, since it only
provides a conveniance function for initializing the native target and not the
native asmprinter.
2009-06-26 21:02:23 +02:00
Christian Kamm
e0331c7b53
Make debug info work with newer LLVM.
2009-06-26 21:00:12 +02:00
Christian Kamm
8bbf6ab984
Treat ConditionalDeclarations correctly in DtoDeclarationExp.
...
Fixes #332 .
2009-06-26 17:18:36 +02:00
Frits van Bommel
8e8837737a
Be a little less overzealous with arrays of void-initialized typedefs;
...
initialize `new VoidTD[][](2)` and `new VoidTD[][][](2, 3)` (but not
`new VoidTD[2][3]`, which is a dynamic array of static arrays of
void-initialized typedefs).
2009-06-24 18:01:02 +02:00
Frits van Bommel
c6750b34b7
Don't initialize arrays of (arrays of...) void-initialized typedefs.
2009-06-24 17:14:50 +02:00
Christian Kamm
5658d9bb38
Emit file and line info for 'Array operation ... not recognized' error.
...
Fixes #326 .
2009-06-22 19:31:25 +02:00
Christian Kamm
265cbea170
Make == for associative arrays test for equality, not identity.
...
_aaEq was added to runtime/internal/aaA.d which forwards to
TypeInfo_AssociativeArray.equals in genobj.d. On the codegen side, DtoAAEquals
was added to gen/aa.cpp and is called from EqualExp::toElem in gen/toir.cpp.
I assume that the frontend will produce an error if == is used on associative
arrays of different type.
This fixes DMD bug 1429.
2009-06-21 19:05:24 +02:00
Frits van Bommel
62dee01d35
Implement equality comparison for associative arrays. The semantics aren't in
...
the spec, but DMD does a simple pointer comparison. Complaints about this go to
http://d.puremagic.com/issues/show_bug.cgi?id=1429 :P.
2009-06-21 00:12:29 +02:00
Frits van Bommel
c261c03752
Put scope-limited data on the stack instead of using 'new' and 'delete'.
2009-06-20 19:44:54 +02:00
Christian Kamm
d7b00783d3
Automated merge with http://hg.dsource.org/projects/ldc
2009-06-20 19:12:04 +02:00
Christian Kamm
42b3da8ac7
Move function codegen data from IrFunction to new FuncGen.
...
This change reduces memory consumption significantly by releasing the
memory held by the STL containers that are now inside FuncGen.
2009-06-20 19:11:44 +02:00