This fixes a segfault with associative array literals of
arrays of associative array literals, which occured because
of arrayLiteralToConst not handling null values properly.
Ensuring that null pointers are handled correctly in all
toConstElem callers is much more error-prone than just
returning an LLVM undef, an error is emitted anyway.
The root of the problem is actually in the kludgly
implementation of AssocArrayLiteral::toElem, we should
revisit this at some point.
This unsfortunately more or less duplicates the code we have for
emitting ArrayLiteralExps, but with the different iteration
strategies, having a single implementation would wind up
even messier.
Unfortunately, no regression test case yet, as I found this deep
inside vibe.d.
This works around linking problems such as rejectedsoftware/vibe.d#338,
caused by the frontend appending template instances to the wrong
module.
GitHub: Fixes#558.
Fixes ABI mismatch when e.g. padding a 28 byte union from a
20 byte member, where previously, an i64 would be emitted,
yielding a 32 byte LLVM struct size on ulong.alignof == 8
platforms.
Test case will follow on the 2.064 branch.
The new module discovery scheme requires the following section order:
.minfo_beg
.minfo
.minfo_end
This works for non-PIC code because the segments have the same attributes.
However, if -relocation-model=pic is passed to ldc2 then the .minfo section
becomes writeable and the sequence of sections is changed.
The quick fix is to mark the data always as writeable. Then all sections are
always writeable.
I think a better solution would be to base this in the used relocation model.
But this information is currently only available in the driver.
This fixes the failure in test case runnable/eh2.d
This is a replacement for the -noruntime switch. With the new DSO implementation
every module generates runtime calls. The main motivation for the -noruntime switch
is to avoid implicit GC calls. Therefore a dedicated -nogc switch is introduced.
If object.di was not read or is incomplete then basic types may be missing.
This results in a crash if they are used during runtime initialization.
This fixes#551.
Assembler support was rewritten in CMake 2.8.5. The new functionality
is required to assemble the file, otherwise a bunch of error messages
is generated. The solution is to exclude the file from the build.
This is only a problem for non-x86 platforms (PPC, Mips).
General advise is to use at least CMake 2.8.5. This fixes#464.
The change not only makes the code cleaner but also fixes compilation of multiple files at once.
Previously, fd->nestedVars may have been filled twice if fd was a template function instantiated in two modules simultaneously.
LLVM 3.4rc2 has been released. As the last issue is fixed, we now start to
support LLVM 3.4.
Adds also a build for LLVM 3.5 (which is allowed to fail).