Commit Graph

3412 Commits

Author SHA1 Message Date
Kai Nacke
49599f71e9 Add sanitizer attributes.
If the sanitizer is enabled (e.g. -sanitize=address) then the corresponding
attribute (e.g. llvm::Attribute::SanitizerAddress) must be set.
2014-01-19 13:03:37 +01:00
Kai Nacke
ea9c996dcd Fix new signature of verifyModule() in LLVM 3.5. 2014-01-19 12:36:42 +01:00
Kai Nacke
a39e5582e6 DLL linkage is decoupled from linkage in LLVM 3.5. 2014-01-19 11:02:27 +01:00
Kai Nacke
87afa717ae Fix more files for LLVM 3.5. 2014-01-13 18:16:22 +01:00
Kai Nacke
c14e065138 Fix the LLVM 3.5 build.
Some classes were moved into IR folder.
2014-01-13 17:08:43 +01:00
Kai Nacke
e69b1ebb28 Change compiler options for MSVC.
This fixes issue #458.
2014-01-12 22:42:34 +01:00
Kai Nacke
b4b71e6c79 Fix include for LLVM 3.5 2014-01-12 11:37:52 +01:00
Kai Nacke
52a17c3a34 Fix build with LLVM 3.5 2014-01-11 17:25:59 +01:00
David Nadlinger
67a1a3273a Merge pull request #569 from jerro/bugfix
Bugfix
2014-01-05 19:31:20 -08:00
Jernej Krempuš
77c0192c06 Added a check for vector size to gen_gccbuiltins.cpp.
Previously, gen_gccbuiltins was emitting intrinsics
that used vector types larger than 256 bits and those
are not defined in core.simd.
2014-01-06 01:30:34 +01:00
Jernej Krempuš
7436d94e09 Fixed a bug in DtoInlineIR
Before this fix, debug info was removed from the module while
parsing inline ir.
2014-01-06 01:27:26 +01:00
Kai Nacke
019d254ea5 Fix for 2nd part of issue #424.
This is a backport from DMD 2.065.
2014-01-03 22:37:48 +01:00
Kai Nacke
2eae9b6f79 Use __linux__ to identify Linux-based systems.
This is a backport from DMD 2.065. It is needed to compile LDC2 with -std=c++11.
2014-01-03 15:51:38 +01:00
Kai Nacke
58305e8bfc Remove DigitalMars garbage collector.
This code is not used and gone in later DMD versions.
2014-01-03 15:47:07 +01:00
Kai Nacke
b021a2930d Remove MSVC crap.
The code was a work around and did not solve the underlying problem.
With 2.064 even the work around stops working.
2014-01-03 15:17:08 +01:00
Kai Nacke
9b4a70c367 Use caching in DtoVaFunctionType.
Remove now unused method IrFuncTy.reset().
2014-01-03 15:14:39 +01:00
Kai Nacke
1f204ba9c5 Fix a c++11 issue 2014-01-03 15:01:39 +01:00
Kai Nacke
c85ea7d5f7 Remove duplicate "sudo" from .travis.yml. 2014-01-03 13:49:55 +01:00
Kai Nacke
551bce6d18 Change location of assign to irFty.
If the comment about this function is still right (can be called recursively) then the assignment
to irFty should be done after all functions are called.
Takes advantage of move assignment, too.
2014-01-03 13:14:12 +01:00
Kai Nacke
535221e16d Add llvm-config-3.5 to search list 2014-01-02 15:57:49 +01:00
Kai Nacke
1619b18f73 Small cleanup of attribute mess. 2013-12-31 17:29:25 +01:00
Kai Nacke
5139008207 Add missing forward declations to gen/utils.h 2013-12-31 16:43:54 +01:00
Kai Nacke
192f3eb13d Fix a typo in MSVC build. 2013-12-29 20:04:34 +01:00
David Nadlinger
467651fc49 Merge pull request #559 from klickverbot/disable-internalizing-nested-functions
Disable internalizing of nested functions.
2013-12-26 06:27:39 -08:00
David Nadlinger
8c0ad88ec3 Merge pull request #557 from klickverbot/assoc-array-const
Handle differing LLVM types for AA literals.
2013-12-26 06:27:28 -08:00
David Nadlinger
333d538a23 Handle differing LLVM types for AA literals.
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.
2013-12-26 13:39:59 +01:00
David Nadlinger
be185263ba Disable internalizing of nested functions.
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.
2013-12-26 13:24:41 +01:00
David Nadlinger
a1ca0def88 Merge pull request #556 from klickverbot/padding-fix
Respect type alignment when choosing zero fill types.
2013-12-26 03:36:17 -08:00
David Nadlinger
f85d2a5a0a Respect type alignment when choosing padding fields.
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.
2013-12-26 12:35:19 +01:00
David Nadlinger
27ecc11915 Remove unused prototype. 2013-12-26 07:05:21 +01:00
Kai Nacke
acb1bb161a Fix a problem with the new array bounds check code. 2013-12-19 20:35:54 +01:00
Kai Nacke
5b14263d67 Add CMAKE_DL_LIBS to link command. 2013-12-19 20:35:25 +01:00
Kai Nacke
5f520fccf9 Cache result of DtoFunctionType. 2013-12-19 19:45:16 +01:00
Kai Nacke
62137ca489 ldmd2 requires -lpthread and -lcurses, too.
This is a change to the LLVM CMake files from LLVM 3.5.
2013-12-19 19:16:08 +01:00
Kai Nacke
14ae04c573 Check for terminfo libary.
This fixes another link error on my ARM device.
2013-12-18 22:47:11 +01:00
Kai Nacke
c4cd972a6f Use logic of LLVM to detect pthread library.
But still need to check if LLVM uses pthreads.
2013-12-18 22:25:13 +01:00
Kai Nacke
e82bd4614c Check for pthreads library.
This fixes a link error on my ARM devices.
2013-12-18 21:36:00 +01:00
Kai Nacke
74630ed7f1 Simplify LLVM passes.
Use a typedef to minimize difference between LLVM 3.1 and Â3.2+.
Use IRBuilder method CreateMemCpy.
2013-12-16 15:00:00 +01:00
Kai Nacke
bac536a29c Fix for issue #553.
Check if a static array is accessed with a known index. In this case the
bounds check can be omitted.
2013-12-16 08:14:58 +01:00
Kai Nacke
d4f8092dde Support LLVM 3.5.
LLVM 3.5 adds a new required component lto.
2013-12-13 07:41:22 +01:00
Kai Nacke
aeba90b9f9 Fix a clang warning 2013-12-08 18:59:17 +01:00
Kai Nacke
43acc1f9c8 Check if basic types are read from object.di before usage.
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.
2013-12-08 17:30:02 +01:00
Kai Nacke
a2d7c9f3ed Only define version Android if compiling for this environment.
Android is a variant of Linux. In order to simplify the version coding,
only version Android is defined (version linux and version Posix are not).
2013-12-08 15:29:10 +01:00
Kai Nacke
0628a1f9f3 Exclude threadasm.S from build if CMake version is less than 2.8.5.
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.
2013-12-08 15:24:42 +01:00
Kai Nacke
7bd1d4900c Do not allow failures for LLVM 3.4 on Travis-CI.
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).
2013-12-05 12:07:56 +01:00
Kai Nacke
1f983f7c6a Cherry-pick phobos commit to make std.math unit test IEEE 754 compliant 2013-12-05 11:11:37 +01:00
Kai Nacke
76199638c1 Fix null pointer derefence in LLVM 3.5 2013-12-05 08:40:04 +01:00
Kai Nacke
cc22116993 Add Android version identifier 2013-12-03 16:47:22 +01:00
Kai Nacke
37ee9962fd Changes for LLVM 3.5 v0.12.1 2013-11-27 22:44:49 +01:00
Kai Nacke
d7d0ebb65c Add new version identifiers if a sanitizer is specified. 2013-11-27 22:43:59 +01:00