Commit Graph

8 Commits

Author SHA1 Message Date
Davide Italiano c2e69eb3d3 [CodeGen] Update test after recent changes in llvm (r293846).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293848 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 00:47:53 +00:00
Davide Italiano cafee2d0da [CodeGen] Update test after recent changes in llvm (r293799).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293810 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 20:43:28 +00:00
Artem Belevich d40c9d5c5a Allow linking multiple bitcode files.
Linking options for particular file depend on the option that specifies the file.
Currently there are two:

* -mlink-bitcode-file links in complete content of the specified file.
* -mlink-cuda-bitcode links in only the symbols needed by current TU.
   Linked symbols are internalized. This bitcode linking mode is used to
   link device-specific bitcode provided by CUDA.

Files are linked in order they are specified on command line.

-mlink-cuda-bitcode replaces -fcuda-uses-libdevice flag.

Differential Revision: http://reviews.llvm.org/D13913

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251427 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-27 17:56:59 +00:00
Artem Belevich 4eac4cf5a9 Fixed double-free in case of module loading error.
GetOutputStream() owns the stream it returns pointer to and the
pointer should never be freed by us. When we fail to load and exit
early, unique_ptr still holds the pointer and frees it which leads to
compiler crash when CompilerInstance attempts to free it again.

Added regression test for failed bitcode linking.

Differential Revision: http://reviews.llvm.org/D9625

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237159 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 17:44:15 +00:00
Rafael Espindola b3dff4d84d Make this test a bit stricter by checking clang's output too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220604 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 01:51:19 +00:00
Stephen Lin 93ab6bf534 CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188447 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-15 06:47:53 +00:00
Rafael Espindola 96e7813f08 Add 'not' to commands that are expected to fail.
This is at least good documentation, but also opens the possibility of
using pipefail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185652 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-04 16:16:58 +00:00
Peter Collingbourne 22a7dfea58 Add support for lazily linking bitcode files (using a new
-mlink-bitcode-file flag), and more generally llvm::Modules, before
running optimisations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143314 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-30 17:30:44 +00:00