311 Commits
Author SHA1 Message Date
David Nadlinger dfa1bd954d Removed {insert, extract}element and shufflevector pragmas.
They have been superseeded by the inline IR pragma and ldc.simd,
and have only been around for a short time (and not in any
released version).
2012-12-08 21:38:54 +01:00
kai ccde570520 Fixed a compiler error with MSVC.
Maybe caused by recent changes to `expression.c`.
2012-11-18 13:37:55 +01:00
David Nadlinger 60ebf5b968 Fix building against the OS X 10.8 SDK.
This is a backport of DMD commit 47bee50a39 by Justin Holewinski.

GitHub: Fixes #218.
2012-11-17 22:29:23 +01:00
Jernej Krempuš 7bbe782615 Pragma llvm_inline_ir
Adding pragma llvm_inline_ir.

Improved the error messages.

Append "ret void" when the return type is void

Improved the error message

in case when the string passed as llvm inline ir isn't valid llvm
assembly language.

LLVM 3.2 fix.

Add attribute AlwaysInline inside DtoInlineIRFunction.

Always generate a body for llvm_inline_ir

Also, always make llvm_inline_ir functions linkonce_odr. Because
the body is always generated when a module uses a llvm_inline_ir
function, the fact that the linker removes the function shouldn't
cause problems.
2012-11-08 22:05:15 +01:00
David Nadlinger d523be3010 Added explanation for commit 9b80037.
Such uncommented changes to the frontend are potentially a huge
source of confusion during merging new frontend versions
(especially if the piece of code gets changed again before the
next upstream release).
2012-10-13 18:20:56 +02:00
David Nadlinger a9e151ee1f Mitigate a nested unions crash/wrong code bug.
This fixes the std.format unit tests for assertion-enabled
LLVM builds.

What the actual solution for the problem should be depends
entirely on the outcome of the "Nested Unions?" discussion
on dmd-internals.
2012-10-13 18:15:13 +02:00
kai 9b80037f56 fix Issue 8675 - Nothrow can't throw Errors
- fixed by checking whether the thrown exception is derived
  from Error before complaining about uncaught throws
2012-10-09 06:43:20 +02:00
David Nadlinger 8118c846af Fixed unlisted contract parameter issue.
Thanks to alexrp for mentioning it.
2012-10-07 14:58:01 +02:00
David Nadlinger 579c522e52 Fix GitHhub #180 – "#ifdef defined(...)". 2012-10-05 17:07:21 +02:00
Jernej Krempuš b798974f3a Added pragma insertelement. 2012-10-02 22:22:53 +02:00
Jernej Krempuš 2cf5d8c2a0 Added pragma extractelement 2012-10-02 21:37:27 +02: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 25beaf41b5 Fix base class contract invocation.
Fixes DMD testcase 'testcontracts'.
2012-09-27 21:05:51 +02:00
David Nadlinger 9e64918efd Fix #162 - contracts for member functions with out parameters.
Also documented the code and changed it to explicitly use IN_LLVM
for the LDC specific parts in order to make debugging/frontend
merging easier.
2012-09-17 01:46:48 +02:00
kai 940d6e907f Take advantage of Triple and TargetData.
A lot of system specific knowledge is already present in LLVM. This is used to populate several fields in global.params instead of hard coded values in main(). Ensures that the frontend and LLVM have always the same values.
2012-09-16 19:50:21 +02:00
David Nadlinger 98f9742db5 FuncDeclaration::semantic3 cleanup.
Cosmetical changes only.
2012-09-16 19:22:17 +02:00
kai 9fad5fcfbd Remove unused inifile implementation.
LDC uses libconfig. The inifile implementation is dead code.
2012-09-16 13:45:28 +02:00
kai 4b0c4bf4ae Get rid of global.params.dataLayout.
The string representation of the data layout is retrieved from the TargetData class (in main) and passed via global.params.dataLayout to the module. Since the gTargetData is also a global variable it makes no sense to pass this information using another global variable.
2012-09-08 20:25:42 +02:00
kai 4ae64dd2e7 Fix size returned by os_critsecsize() and construct type for D_CRITIAL_SECTION on Windows. 2012-09-08 11:49:37 +02:00
David Nadlinger bf0d8afc88 Merge branch 'dmd-2.060' into master.
Conflicts:
	dmd2/func.c
	dmd2/mars.c
2012-09-07 04:15:44 +02:00
David Nadlinger 57b2eb3dad Fixed crash on nested functions with parameters that have a postblit.
Implementing the recursion in DeclarationExp::apply, which seems more
natural, lead to a "cannot interpret" CTFE error in Phobos.

An upstream bug will be raised about this.
2012-09-07 03:51:33 +02:00
David Nadlinger 207033c427 Removed LDC-only dead code.
Helps avoid broken merges.
2012-09-07 03:51:33 +02:00
kai 8987f2da30 Fix format for MSVC. 2012-09-07 03:51:32 +02:00
David Nadlinger 6fea7358dc Fixed several asm-related error message formats. 2012-09-07 03:51:32 +02:00
David Nadlinger 837ef30fec Merged DMD 2.060 frontend.
Upstream Git tag v2.060 (e8fe11c20249cb9e42538be88c99b74ede4d12e3).
2012-09-07 03:51:31 +02:00
David Nadlinger e03e027002 Removed all CRLF line endings from DMD source.
Some files in our copy of the DMD 2 source had CRLF line endings.
This was not only inconsistent, but also made merging DMD patches
(where LF is used throughout) unnecessarily painful.
2012-09-07 03:51:31 +02:00
kai 9a3cdf2e10 Use .obj extension on Windows.
The Windows linker LINK insists on the .obj extension. The following changes are made:
- CMake uses the same extension as the C compiler
- global.obj_ext_alt (aka .obj) is recognized as objectfile extension
- global.obj_ext_alt is used on Windows
2012-09-05 19:23:34 +02:00
kai 521921e5d3 Fix some whitespace issues. 2012-08-25 14:41:33 +02:00
kai 1205e3ea83 Use TargetData to get size of certain types (instead of hard-coded values). 2012-08-25 01:29:42 +02:00
kai e6a07ffdfe Several changes to optimizer related code.
- New functions codeGenOptLevel() and verifyModule() to remove code duplication
- Hidden option no-verify renamed to disable-verify and moved to optimizer (like opt tool)
- Removed global.params.noVerify
2012-08-16 23:26:52 +02:00
Jernej Krempuš 100907ffa2 Added pragma shufflevector. 2012-08-06 20:50:33 +02:00
kai dbb5a34eda Add changes for LLVM 3.2. 2012-07-29 17:31:50 +02:00
kai e13b115583 More unification work. 2012-07-29 14:22:56 +02:00
kai cb77cca0d3 Fix bug in ComplexExp::toChars(). Also fixed in dmd 2.060. 2012-07-14 19:55:52 +02:00
kai 175810bdab Consolidate all MSVC related files for LDC/LDC2 in 1 folder. 2012-06-06 17:32:47 +02:00
kai 30cc6e309a Add more files required for MSVC. 2012-06-01 17:49:28 +02:00
kai 48f8ffeb0b Further changes to compile using MSVC. 2012-05-23 17:36:26 +02:00
Alexey Prokhin bb2ca5b4f5 Fixed #94 — Phobos Builds Fail.
Reapplied ldc specific patches onto floatToBuffer()
2012-04-27 11:10:12 +04:00
Alexey Prokhin f4d8021e5a Merge branch 'master' of github.com:ldc-developers/ldc 2012-04-22 12:17:01 +04:00
Alexey Prokhin 3fb21f986e Merged the last bits of dmdfe 2.059 2012-04-22 12:10:47 +04:00
Alexey Prokhin 21a926c936 Resolved small merge conflict.
FuncAliasDeclaration::mangle() was wrongly put into '#if IN_DMD' block.
2012-04-21 22:37:36 +04:00
Alexey Prokhin 7e23eb5047 Infer function literal kind (TOKdelegate or TOKfunction). 2012-04-21 22:37:36 +04:00
Alexey Prokhin 0e54278c5a Implicitly cast return expression to inferenced return type of a literal function.
The commit fixes a segfault when compiling a code similar to:
  float delegate() d = { return 1.0; };
2012-04-21 22:37:36 +04:00
Alexey Prokhin 27fadea1b9 Merged last dmd2 changes 2012-04-06 15:46:07 +04:00
Alexey Prokhin bca73ec8b9 Merged dmd 2.059beta 2012-04-05 15:30:00 +04:00
Alexey Prokhin 50bbeb7c6f Remerged dmd2 frontend using git subtree 2012-04-05 11:12:22 +04:00
Alexey Prokhin 038825a195 Temporary removed dmd2 frontend 2012-04-05 11:10:26 +04:00
Eldar Insafutdinov feefad412c Move cl_options out of LDCShared 2012-04-02 14:53:52 +01:00
kai e5f2430855 Remove unused member VarDeclaration::anonDecl. 2012-03-28 06:57:17 +02:00
kai e739102374 Removed unused member VarDeclaration::offset2. 2012-03-27 07:13:55 +02:00