Frits van Bommel
371cdb71ba
Remove an incorrect attribute: noalias doesn't apply to struct types, even if
...
we prefer to think of that type as an array :(.
2009-05-17 02:22:21 +02:00
Frits van Bommel
76ae0b0ab6
Fix format-string bugs by adding __attribute__((__format__)) in all applicable
...
places and fixing all warnings my gcc produced.
Among other things, this should fix several segfaults (including one I just
ran into).
2009-05-17 00:15:25 +02:00
Christian Kamm
392a4a850e
Add patch for Tango 0.99.8.
2009-05-16 23:44:27 +02:00
Frits van Bommel
e7e3632d36
Remove a macro-redefinition warning
2009-05-16 23:00:56 +02:00
Tomas Lindquist Olsen
b87acdc36f
Updated DMDFE version id from 1.042 to 1.045 ...
2009-05-16 22:27:31 +02:00
Tomas Lindquist Olsen
6633d696c9
Forgot to set the (ClassInfo.flags & 32) bit added in 1.045.
2009-05-16 22:24:49 +02:00
Tomas Lindquist Olsen
e8780d50e8
Merged DMD 1.045 !!!
2009-05-16 22:21:31 +02:00
Tomas Lindquist Olsen
9beb33770f
Fixed previous aggregate initZ alignment.
...
Added missing IrType::isDelegate method.
2009-05-16 18:37:16 +02:00
Tomas Lindquist Olsen
2e33a6af9f
Added explicit alignment for aggregate __initZ symbols, this is needed for some union types, or the default initializer symbol might be misaligned.
2009-05-16 18:25:01 +02:00
Tomas Lindquist Olsen
c0f2af5afd
Added IrTypeFunction and IrTypeDelegate and eliminated IrDType. This means the Type::ir field can be removed. It's the final part needed for the move to a slightly more sane type system. Now the whole thing just needs to be cleaned up :P
...
Added -v-cg switch, which right now just prints "codegen: module.name (module/name.d)" to stdout, this can really help figuring out where, in some complex build command, things go wrong.
2009-05-16 18:19:52 +02:00
Christian Kamm
61514569ff
Automated merge with http://hg.dsource.org/projects/ldc
2009-05-16 14:22:23 +02:00
Christian Kamm
8c422bde53
Don't always expand aliases to FuncDecls to FuncAliasDecls - breaks for single
...
functions.
2009-05-16 14:22:09 +02:00
Benjamin Kramer
46b200a4ed
silence a gcc warning
2009-05-16 13:50:44 +02:00
Frits van Bommel
c05183123d
Automated merge with http://hg.dsource.org/projects/ldc
2009-05-16 13:10:35 +02:00
Frits van Bommel
541f3723cd
Intrinsics shouldn't see struct padding, so use a special TargetABI for them
...
that removes it.
This unbreaks the `llvm_*_with_overflow` intrinsics.
2009-05-16 13:06:49 +02:00
Christian Kamm
53c3ac0313
Fix overload resolution issue in dmd bug 313/314 fix.
2009-05-16 12:17:33 +02:00
Tomas Lindquist Olsen
62e8384da0
Set explicit alignment for normal global variables, ensures alignment is correct for globals with union type.
2009-05-15 17:17:20 +02:00
Tomas Lindquist Olsen
0680e6a3ca
Enabled fix for ticket #294 . It will try it's best to let LLVM handle the alignment, and fall back to manual padding when that's not possible. If this causes problems again, we'll have to consistently pad manually using packed structs.
2009-05-15 17:05:35 +02:00
Tomas Lindquist Olsen
ad142b5fda
Erm... Revert the rev [1352] change, the original code was correct ...
2009-05-15 15:30:59 +02:00
Frits van Bommel
41c738f4da
Re-apply [1346], which was reverted in [1348], now that padding should no longer
...
be a problem.
As noted before, this will break ABI-compatibility on x86-64, so recompile old
code before linking with newly-compiled code if you're on x86-64.
As an added bonus, I actually tested it this time :).
2009-05-14 20:40:56 +02:00
Frits van Bommel
287b1278d3
Remove struct padding when passing or returning in registers on x86-64 (extern(D) only)
2009-05-14 20:36:55 +02:00
Tomas Lindquist Olsen
a0678dc9ec
Oups, fix assertion condition in disabled code from rev [1351].
2009-05-14 17:23:55 +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
Tomas Lindquist Olsen
f5d635dfc7
Adds explicit alignment information for alloca instructions in general, there's a few cases that still needs to be looked at but this should catch the majority. Fixes ticket #293 .
2009-05-14 13:26:40 +02:00
Christian Kamm
5694ec18ff
Use getenv on Windows, closes #248 .
2009-05-13 18:08:40 +02:00
Frits van Bommel
72a546af4a
Revert [1346] for now, it breaks because of padding :(
2009-05-12 16:53:43 +02:00
Frits van Bommel
35d62be334
Remove some other code that tested for LLVM before r67588.
2009-05-12 16:02:51 +02:00
Frits van Bommel
ec476cc5f1
Remove an old workaround that was kept around for ABI-compatibility on x86-64
...
between different LLVM versions.
This means LLVM r67588 is required if you want to compile for x86-64, otherwise
the backend will assert when you try to return e.g. struct { int i; char c; }
from a function. (In particular, this is no longer compatible with LLVM 2.5)
It also means that any code returning small structs on x86-64 will probably
need to be recompiled in order to be linkable to code compiled with this change.
2009-05-12 15:50:48 +02:00
Tomas Lindquist Olsen
77cb1c6b8e
Added error instead of assertion failure when trying to get !TypeInfo for a forward declared struct.
2009-05-11 20:54:25 +02:00
Frits van Bommel
e4e07baf87
Re-enable consistency check for fixed LLVM versions.
2009-05-11 15:48:33 +02:00
Frits van Bommel
49a2924823
Update for metadata changes in LLVM trunk.
2009-05-11 11:59:22 +02:00
Christian Kamm
041a8c4bd3
Fix DtoArrayCopyToSlice by passing length*sizeof(element) instead of just length to _d_array_slice_copy.
2009-05-10 22:26:04 +02:00
Frits van Bommel
57fc3463f6
Run backend without optimizations when no optimization parameters were used,
...
even when not generating debug info.
2009-05-10 20:22:08 +02:00
Christian Kamm
dfaba71dce
Fix the ldcbinarypath config file rewriting.
2009-05-10 18:14:36 +02:00
Christian Kamm
d7c984fbef
Explicitly include string.h for strdup.
2009-05-10 18:03:32 +02:00
Christian Kamm
226e85bf30
Automated merge with http://hg.dsource.org/projects/ldc
2009-05-10 17:58:35 +02:00
Christian Kamm
ba95eab71f
In config file: replace %%ldcbinarypath%% with the path to the ldc executable.
2009-05-10 17:58:09 +02:00
Tomas Lindquist Olsen
3fb2cb0322
Okay... Fix the assertion as well, since 20 really is enough yet it wanted MORE... Despite the message.
2009-05-10 17:31:56 +02:00
Tomas Lindquist Olsen
0ab77de246
Increased a buffer size in TypeInfo_StaticArray from 10 to 20 to avoid assertion failures! Thanks LeoD.
2009-05-10 17:25:47 +02:00
Tomas Lindquist Olsen
4f59c0cb7b
Removed fix from rev [1331] since rev [1333] adds a more general fix that catches more cases!
2009-05-10 15:50:51 +02:00
Christian Kamm
813c650517
Backport D2 CTFE cast behavior to allow cast(char[])char[n] to succeed.
2009-05-10 15:42:23 +02:00
Tomas Lindquist Olsen
ea00a120e9
Added testcase for #288 .
2009-05-10 14:37:30 +02:00
Tomas Lindquist Olsen
c6dca3fb76
Fixed CTFE evaluation on .dup . Fixes ticket #288 .
2009-05-10 14:32:23 +02:00
Tomas Lindquist Olsen
dbe4852b7b
Fixed D-style vararg arguments with types that have sizes bigger that pointers, yet are not aligned to pointer sizes. Fixes ticket #276 .
2009-05-10 04:37:03 +02:00
Frits van Bommel
d1f582583b
Turn new _d_array_slice_copy runtime call into memcpy when the slice lengths are
...
equal and alias analysis says it's safe.
2009-05-10 04:18:14 +02:00
Tomas Lindquist Olsen
dfea022a86
Changed array slice copying to call a runtime function when assertions or array bound checks are enabled instead of just doing a memcpy. This makes sure an exception is thrown if the copy is invalid (ie. different lengths or overlap). Fixes ticket #283 . Rebuilding the runtime is necessary.
2009-05-10 02:23:05 +02:00
Tomas Lindquist Olsen
54d9955abc
Added reference to DMD bug for latest dstress "regressions" compile/m/mixin_29_E.d and compile/m/mixin_29_F.d .
2009-05-10 00:50:35 +02:00
Tomas Lindquist Olsen
ecc106d7b7
Fixed dmdfe generated class invariant calls. Also insert proper "this !is null" check before it. Fixed invariant* dstress regressions and generally seems like a good idea. Hope I didn't break anything.. minitests run fine!
2009-05-10 00:46:09 +02:00
Christian Kamm
06108db87e
Yet another fdiv/fsub special case.
2009-05-09 20:13:05 +02:00
Christian Kamm
883f13dbce
Strip metadata for -singleobj as a workaround to a LLVM linking bug.
2009-05-09 18:57:21 +02:00