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'.
Needs to be expanded with a short section on contributing (and a
separate CONTRIBUTING file, for the GitHub feature), ...
LICENSE also needs an overhaul, and our files need license headers.
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.
Variable `args` was used without first checking for valid values. You could crash LDC by entering something like 'pragma(intrinsic) void crash();' in the source file.
This simplifies the code in module.cpp a bit. But it is also the base to implement a pragma to place an arbitrary function in llvm.global_ctors and llvm.global_dtors.
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.
- Add new files and remove unused files.
- Only create .bc files if requested.
(Creating .bc and .obj files at the same time confuses the LIB tool. Maybe a CMake bug....)
- Add references to new commits for Win64 in druntime and phobos.
See the comment in DtoCallFunction for an explanation of what is
going on.
The struct zero initialization code was also refactored out to
AssignExp::toElem and modified so that it is only triggered
on integer->struct assignments, not for any types where the
modifier-stripped types don't match up. This would have lead to
silently wrong code in the cases where the assert would have been
triggered otherwise.
Fixes the Phobos testsuite build.
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.