David Nadlinger
edbace8ae8
Default to PIC on OS X.
...
driver/target.h is due for a refactoring after the next
release is branched off.
2013-05-19 21:19:37 +02:00
David Nadlinger
4597423dc5
More IN_LLVM.
2013-05-19 20:52:51 +02:00
David Nadlinger
4ad1b94f11
Remove piece of dead code gone from upstream as well.
...
We do not support building with DMC anyway, so no
functionality change implied.
2013-05-19 20:52:42 +02:00
David Nadlinger
ad4eb1b6bd
Align unused real alignment code to upstream source.
...
We set the target-specific values at runtime in Type::init().
2013-05-19 20:52:42 +02:00
David Nadlinger
8123c1c7b9
Pull in hack to reduce GC root ranges on Linux.
...
GitHub: #233 .
2013-05-19 20:52:26 +02:00
David Nadlinger
8d0749c394
Merge pull request #360 from klickverbot/union-initializer
...
Unify struct initializer codegen, fix it for unions
2013-05-19 11:49:55 -07:00
David Nadlinger
87c8a96545
Check initializer type size in IrStruct::getDefaultInit().
2013-05-19 20:25:16 +02:00
David Nadlinger
1fed92b9b7
VarExp::toElem refactoring and global size assertion.
...
Frontend errors shouldn't be used for glue layer consistency
checks – maybe the error was actually hit in ancient versions.
2013-05-19 20:25:16 +02:00
David Nadlinger
41e580a79f
Get rid of now-obsolete DtoConstInitializerType.
2013-05-19 20:25:16 +02:00
David Nadlinger
eef05ba019
Do not try to guess exact initializer type.
...
This might have been required with the old (pre-3.0) LLVM
type system, but the module linker handles global type
resolution just fine now.
Also, it is virtually impossible to determine the type in
advance for some cases, e.g. an array of unions with an
initializer that contains pointers to the array itself.
2013-05-19 20:25:11 +02:00
David Nadlinger
f8f405000b
Avoid confusing naming convention.
...
We generally do not really use underscore prefixes. But if
they are used in other codebases, they typically refer to
member variables.
2013-05-18 19:51:37 +02:00
David Nadlinger
7b435c2c87
Unify handling of struct initializers.
...
GitHub: Fixes #351 .
2013-05-18 19:51:37 +02:00
David Nadlinger
b577d1cf0b
Handle different element initializer types in array literals.
2013-05-18 16:46:57 +02:00
David Nadlinger
b49cbeaaf1
Factored out struct initializer constant generation.
2013-05-17 01:02:02 +02:00
David Nadlinger
beed5c3044
Get rid of empty IrBase class.
...
It isn't useful in any way now that the GC is out of the
picture, and the existance of a "dummy" toChars() method is
annoying when debugging.
2013-05-15 20:28:53 +02:00
David Nadlinger
f57eac796f
Expand on IrType::get rationale.
2013-05-15 20:19:44 +02:00
kai
23df06a3ba
Add <cctype> to asm-x86.h.
...
This removes a conditional block introduced for MSVC.
2013-05-13 21:19:01 +02:00
Kai Nacke
116432808b
Merge pull request #352 from redstar/winldmd
...
Add missing include for Windows
2013-05-13 11:20:24 -07:00
kai
a31d704941
Add missing include for Windows
2013-05-13 18:47:59 +02:00
David Nadlinger
b3dbf9cd9c
Merge pull request #349 from klickverbot/fix-moduleinfo
...
Fixed ModuleInfo module name emission
2013-05-12 05:21:08 -07:00
David Nadlinger
7048c69d51
Merge pull request #350 from klickverbot/oss-response-expand
...
Replaced response_expand with BSD-licensed reimplementation.
2013-05-12 05:01:14 -07:00
David Nadlinger
db270a9a94
Replaced response_expand with BSD-licensed reimplementation.
...
Cleanup to follow later.
GitHub: Fixes #267 .
2013-05-12 13:38:23 +02:00
David Nadlinger
b2ca861f64
Fixed ModuleInfo module name emission.
...
The name string is actually emitted inline, not as a pointer
to a global.
GitHub: Fixes #243 .
2013-05-12 01:25:48 +02:00
David Nadlinger
e1501c712f
Moved constant array creation helper to llvmhelpers.h.
2013-05-12 01:25:12 +02:00
David Nadlinger
ad03a435ad
Remove code for emitting the old ModuleInfo layout.
2013-05-12 00:47:49 +02:00
David Nadlinger
b2da152704
Remove D1 ModuleInfo remnants.
2013-05-12 00:39:15 +02:00
David Nadlinger
fc8e0c4c20
Revert -float-abi implementation.
...
The new command line option conflicted with a builtin LLVM 3.0
one. The functionality will be added back in after the 0.11.0
release branch has been created.
This reverts commit 6a1bc70bd7 and
subsequent fixes.
2013-05-12 00:18:44 +02:00
David Nadlinger
7500673395
Merge pull request #348 from klickverbot/fix-eh
...
Update catch landingpad codegen to match latest druntime change.
2013-05-11 14:56:04 -07:00
David Nadlinger
f894a7809c
Update catch landingpad codegen to match latest druntime change.
2013-05-11 23:29:39 +02:00
kai
80c4f953c0
Add test case for issue #328
2013-05-11 23:05:34 +02:00
kai
2e4b85d2d6
Fix for issue #328 .
...
The wrong pointer is passed to the landing pad. This wrong pointer is used
if the stack unwinding resumes.
2013-05-11 22:18:23 +02:00
David Nadlinger
7fe8406ec2
Merge in test cases for GitHub issue #340 .
2013-05-11 22:03:08 +02:00
David Nadlinger
8da8bdd209
LLVM pre-3.2 does not have llvm::Triple::Android.
...
Strangely enough, the Travis pull request status was
definitely green before I merged it in.
2013-05-11 21:44:05 +02:00
David Nadlinger
e37f0e0d35
Fix ARM default floating-point ABI.
...
It shouldn't really matter, as we probably aren't going to
support anything but AAPCS anytime soon.
2013-05-11 21:33:20 +02:00
David Nadlinger
17ef7f7d09
Merge pull request #345 from klickverbot/template-function-label
...
Fix inline asm labels in template functions.
2013-05-11 12:24:30 -07:00
David Nadlinger
b5dd0e07f2
Merge pull request #344 from klickverbot/float-abi
...
Added -float-abi and auto-detection logic for ARM.
2013-05-11 12:17:19 -07:00
David Nadlinger
6a1bc70bd7
Added -float-abi and auto-detection logic for ARM.
...
Even though this argument design conflates two separate concepts
(ABI and hardware/software implementation), I chose to go
with it since users are liekly know it from GCC and the
combination of softloat operations with hardfloat ABI makes
no sense.
I didn't implement it for old LLVM versions, as ARM EABI
exception handling requires LLVM 3.3+ anyway, without which
LDC would be useless anyway.
2013-05-11 21:07:54 +02:00
David Nadlinger
5742a0219c
Fix inline asm labels in template functions.
...
This is a giant kludge to avoid a redesign of the inline asm
handling code. I'd be glad if somebody came up with a better
solution.
GitHub: Fixes #340 .
2013-05-11 21:01:24 +02:00
David Nadlinger
15fd67be03
Remove code for unimplemented goto-into-asm check.
...
The check was never fully implemented. We need to look into
this again, as currently we fail with a fairly unintellegible
LLVM ICE (added as GitHub #).
2013-05-11 20:18:34 +02:00
David Nadlinger
8b9deecf34
Remove dead code.
2013-05-11 20:12:25 +02:00
David Nadlinger
d15a3bacac
Minor cleanup.
2013-05-11 18:43:41 +02:00
kai
91d653c730
Backport of changes for Linux/PPC64.
...
Most endian issues and some other problems are gone. Makes the whole thing fly a lot easier.
2013-05-10 14:00:36 +02:00
kai
e233f803ff
Merge branch 'memcpy'
2013-05-10 13:48:39 +02:00
kai
fa3054c7cc
Fix uninitialized var in TemplateDeclaration.
...
This is a partial backport of 214b0fdb26 .
2013-05-10 13:10:40 +02:00
kai
522c06ff7f
Do not memcpy with same source and destination.
...
This can happen for sret_args. Drop the assignment in this case.
2013-05-10 12:59:14 +02:00
David Nadlinger
2fb8d6d51b
callWithStackShell for ARM.
2013-05-10 01:52:14 +02:00
David Nadlinger
a792ecbaf2
Fix function attribute handling on LLVM 3.3+.
...
The issue was that when merging in the old attributes, attrs
wasn't assigned to, thus silently dropping all of them
(leading e.g. to noinline being omitted on functions containing
inline asm).
The new code hopefully also makes the intent clearer.
2013-05-09 22:57:33 +02:00
David Nadlinger
10f5d74737
Fix uninitialized vars in EnumDeclaration
...
'protection' and 'parent' are used in ScopeDSymbol::search
detected by Valgrind). The assignment in semantic0 is enough to
fix the bug, but I also added an initialization to the constructor.
This is a backport of DMD commit 4dfaf02d4d by Don Clugston.
2013-05-09 22:33:08 +02:00
David Nadlinger
e5d6cf4dd8
Merge pull request #341 from klickverbot/default-target-cpu
...
Use generic target CPU by default
2013-05-09 13:16:02 -07:00
David Nadlinger
30bf4e121f
Do not optimize for host CPU by default.
...
GitHub: Fixes #323 .
2013-05-09 22:15:19 +02:00