Commit Graph

244684 Commits

Author SHA1 Message Date
Vadim Macagon 4b7bb3cc96 [LLDB-MI] Minor cleanup of CMICmnLLDBUtilSBValue class
Summary:
Placeholder c-strings don't need to be instance variables.

Reviewers: ki.stfu, abidh

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D25592

llvm-svn: 284231
2016-10-14 12:58:02 +00:00
Eric Fiselier 194e027f4c Disable Modules when building the libc++ sources.
Libc++ will not build with modules enabled. In order to support an in-tree
libc++ when LLVM_ENABLE_MODULES is ON we need to explicitly disable the feature.

Unfortunately the libc++ sources are fundamentally non-modular. For example
iostream.cpp defines cout, cerr, wout, ... as char buffers instead of streams
in order to better control initialization/destruction. Not shockingly Clang
diagnoses this. Many other sources files define _LIBCPP_BUILDING_FOO macros to
provide definitions for normally inline symbols (See bind.cpp). Finally The
current module.map prohibits using <strstream> in C++11 so we can't build
strstream.cpp.

I think I can fix most of these issues but until then just disable modules.

llvm-svn: 284230
2016-10-14 12:56:52 +00:00
Alexey Bataev bef6aa6ea9 Fix for PR30632: Name mangling issue.
There was a bug in the implementation of captured statements. If it has
a lambda expression in it and the same lambda expression is used outside
the captured region, clang produced an error:
```
error: definition with same mangled name as another definition
```
Here is an example:
```
struct A {
 template <typename L>
 void g(const L&) { }
};

template<typename T>
void f() {
  {
    A().g([](){});
  }
  A().g([](){});
}

int main() {
  f<void>();
}
```

Error report:
```
main.cpp:3:10: error: definition with same mangled name as another
definition
    void g(const L&) { }
             ^
main.cpp:3:10: note: previous definition is here
```
Patch fixes this bug.

llvm-svn: 284229
2016-10-14 12:43:59 +00:00
Eric Liu 735f3a26be Removed duplicate header include
Reviewers: ioeric

Subscribers: klimek

Patch by Krasimir Georgiev!

Differential Revision: https://reviews.llvm.org/D25599

llvm-svn: 284228
2016-10-14 11:48:10 +00:00
George Rimar 85e6106d76 [ELF] - Do not crash when object has multiple SHT_MIPS_OPTIONS
Issue was revealed by AFl and I was able to generate such object using yaml2obj.

When object has more than one SHT_MIPS_OPTIONS, 
each except the last one is destroyed after placing into Sections array.
Sections array contains dead pointers finally. LLD may crash then.

Differential revision: https://reviews.llvm.org/D25555

llvm-svn: 284227
2016-10-14 11:10:36 +00:00
George Rimar cc6e567ca3 [ELF] - Implemented -z wxneeded.
-z wxneeded creates a PHDR PT_OPENBSD_WXNEEDED.

PT_OPENBSD_WXNEEDED
The array element specifies that a process executing this file may need to be able to map or protect memory regions as simultaneously executable and writable. If the system is unable or unwilling to permit that for this executable then it may fail immediately. This segment type is meaningful only for executable files and is ignored in other objects.

http://man.openbsd.org/OpenBSD-current/man5/elf.5

Differential revision: https://reviews.llvm.org/D25472

llvm-svn: 284226
2016-10-14 10:34:36 +00:00
Eric Fiselier 68696836d1 Work around Clang driver segfault when --coverage is used with -c and /dev/null
llvm-svn: 284225
2016-10-14 10:30:33 +00:00
Nicolai Haehnle 67624af0cc AMDGPU: Select 64-bit {ADD,SUB}{C,E} nodes
Summary:
This will be used for 64-bit MULHU, which is in turn used for the 64-bit
divide-by-constant optimization (see D24822).

Reviewers: arsenm, tstellarAMD

Subscribers: kzhuravl, wdng, yaxunl, llvm-commits, tony-tye

Differential Revision: https://reviews.llvm.org/D25289

llvm-svn: 284224
2016-10-14 10:30:00 +00:00
Diana Picus 68c7b04e8d [GlobalISel] Get the AArch64 tests to work on Linux
Mostly this just means changing the triple from aarch64-apple-ios to the generic
aarch64--. Only one test needs more significant changes, but GlobalISel already
does the right thing so it's ok to just change the checks.

Differential Revision: https://reviews.llvm.org/D25532

llvm-svn: 284223
2016-10-14 10:19:40 +00:00
Eric Liu c45343ea28 Try to fix windows bot file path style failure caused by r284219.
llvm-svn: 284222
2016-10-14 10:10:26 +00:00
Haojian Wu 7bd492c53a [clang-move] Matching static class member more correctly.
Reviewers: ioeric

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D25598

llvm-svn: 284221
2016-10-14 10:07:58 +00:00
Nicolai Haehnle 86e72d98dd Fix use-after-frees
Extracted from D25313, as suggested by Justin Bogner.

llvm-svn: 284220
2016-10-14 09:49:51 +00:00
Eric Liu cefe763dd2 Deduplicate sets of replacements by file names.
Summary:
If there are multiple <File, Replacements> pairs with the same file
path after removing dots, we only keep one pair (with path after dots being
removed) and discard the rest.

Reviewers: djasper

Subscribers: klimek, hokein, bkramer, cfe-commits

Differential Revision: https://reviews.llvm.org/D25565

llvm-svn: 284219
2016-10-14 09:32:06 +00:00
Simon Dardis b3fd189cb5 [mips] Fix aui/daui/dahi/dati for MIPSR6
For compatiblity with binutils, define these instructions to take
two registers with a 16bit unsigned immediate. Both of the registers
have to be same for dahi and dati.

Reviewers: dsanders, zoran.jovanovic

Differential Review: https://reviews.llvm.org/D21473

llvm-svn: 284218
2016-10-14 09:31:42 +00:00
Eric Fiselier ccc6502abc Mark test as unsupported without threads
llvm-svn: 284217
2016-10-14 09:12:53 +00:00
Eric Fiselier 9a7c3e56fd Remove dead CMake target
llvm-svn: 284216
2016-10-14 09:06:38 +00:00
Nicolai Haehnle bd15c3267f AMDGPU: Fix use-after-frees
Reviewers: arsenm, tstellarAMD

Subscribers: kzhuravl, wdng, yaxunl, tony-tye, llvm-commits

Differential Revision: https://reviews.llvm.org/D25312

llvm-svn: 284215
2016-10-14 09:03:04 +00:00
Eric Fiselier 81b13934c1 XFAIL aligned allocation tests for older Clang versions
llvm-svn: 284214
2016-10-14 08:47:09 +00:00
Michael Zuckerman 387530ffe3 [x86][ms-inline-asm] use of "jmp short" in asm is not supported
Test linked to: https://reviews.llvm.org/D24957

Committing in the name of Ziv Izhar: After check-all and LGTM .

Differential Revision: https://reviews.llvm.org/D24958

llvm-svn: 284213
2016-10-14 08:13:27 +00:00
Marek Kurdej 505434bd28 [clang-tidy] Fix readability-braces-around-statements false positive
Summary:
This fixes a false-positive e.g. when string literals are returned from if statement.

This patch includes as well a small fix to includes and renames of the test suite that collided with the name of the check.

Reviewers: alexfh, hokein

Subscribers: hokein

Tags: #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D25558

llvm-svn: 284212
2016-10-14 08:10:08 +00:00
Michael Zuckerman 174d2e784b [x86][ms-inline-asm] use of "jmp short" in asm is not supported
Committing in the name of Ziv Izhar: After check-all and LGTM .

The following patch is for compatability with Microsoft.
Microsoft ignores the keyword "short" when used after a jmp, for example:
__asm {
      jmp short label
      label:
      }

A test for that patch will be added in another patch, since it's located in clang's codegen tests. Link will be added shortly.
link to test: https://reviews.llvm.org/D24958

Differential Revision: https://reviews.llvm.org/D24957

llvm-svn: 284211
2016-10-14 08:09:40 +00:00
Eric Fiselier 73bfe423fe XFAIL aligned allocation test failures with UBSAN
llvm-svn: 284210
2016-10-14 07:49:15 +00:00
Eric Fiselier 498ee00a3a Add void_t and invoke feature test macros
llvm-svn: 284209
2016-10-14 07:19:52 +00:00
Eric Fiselier ffb602125a Update OS X ABI list
llvm-svn: 284208
2016-10-14 06:49:30 +00:00
Eric Fiselier 831a86a191 Correct ABI changelog revision number
llvm-svn: 284207
2016-10-14 06:47:37 +00:00
Eric Fiselier 0ae4f23fdc Implement P0035R4 -- Add C++17 aligned allocation functions
Summary:
This patch implements the library side of P0035R4. The implementation is thanks to @rsmith.

In addition to the C++17 implementation, the library implementation can be explicitly turned on using `-faligned-allocation` in all dialects.


Reviewers: mclow.lists, rsmith

Subscribers: rsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D25591

llvm-svn: 284206
2016-10-14 06:46:30 +00:00
Eric Fiselier d2c29f9c54 Cleanup LIT testing doc
llvm-svn: 284205
2016-10-14 06:15:27 +00:00
Craig Topper 40feb7f157 [DAGCombiner] Teach createBuildVecShuffle to handle cases where input vectors are less than half of the output vector size.
This will be needed by a future commit to support sign/zero extending from v8i8 to v8i64 which requires a sign/zero_extend_vector_inreg to be created which requires v8i8 to be concatenated upto v64i8 and goes through this code.

llvm-svn: 284204
2016-10-14 06:00:42 +00:00
Eric Christopher 2bd52b5d91 In preparation for removing getNameWithPrefix off of TargetMachine,
sink the current behavior into the callers and sink
TargetMachine::getNameWithPrefix into TargetMachine::getSymbol.

llvm-svn: 284203
2016-10-14 05:47:41 +00:00
Eric Christopher 445c952bd0 Tidy the calls to getCurrentSection().first -> getCurrentSectionOnly to help
readability a bit.

llvm-svn: 284202
2016-10-14 05:47:37 +00:00
Eric Christopher b2437da968 Tidy up example of getting the pointer size.
llvm-svn: 284201
2016-10-14 05:45:46 +00:00
Eric Fiselier 35355bb896 Remove two ABI symbols added after the 3.9 release
llvm-svn: 284200
2016-10-14 05:29:46 +00:00
Eric Fiselier 5182ba5a9f Add ABI changelog entry for <any>
llvm-svn: 284199
2016-10-14 05:10:06 +00:00
Eric Fiselier 505233b966 Sort ABI lists by name so that changes don't generate big diffs
llvm-svn: 284198
2016-10-14 05:04:00 +00:00
Konstantin Zhuravlyov d4327e95dd [ELF/AMDGPU]: Add support for new relocations
Differential Revision: https://reviews.llvm.org/D25563

llvm-svn: 284197
2016-10-14 04:51:43 +00:00
Konstantin Zhuravlyov c96b5d7073 [AMDGPU] Emit 32-bit lo/hi got and pc relative variant kinds for external and global address space variables
Differential Revision: https://reviews.llvm.org/D25562

llvm-svn: 284196
2016-10-14 04:37:34 +00:00
Konstantin Zhuravlyov 2a2ac37c2c [AMDGPU] Add 32-bit lo/hi got and pc relative variant kinds and emit appropriate relocations
Differential Revision: https://reviews.llvm.org/D25548

llvm-svn: 284195
2016-10-14 04:21:32 +00:00
Eric Fiselier e9c4ddbfb5 Revert r284193 - it is not correct on OS X
llvm-svn: 284194
2016-10-14 04:21:24 +00:00
Eric Fiselier 94b5f18fa4 Re-export two previously exported std::string functions.
These functions were removed from the dylib sometime between the 3.9 release
and now. This patch manually exports them to re-gain ABI compatibility.

llvm-svn: 284193
2016-10-14 04:14:24 +00:00
Eric Fiselier 43e72f5ee6 Add ABI list for 3.9 linux
llvm-svn: 284192
2016-10-14 04:06:19 +00:00
Konstantin Zhuravlyov ee68fdadfe [Support/ELF/AMDGPU] Add 32-bit lo/hi got and pc relative relocations
Added relocation names:
  - R_AMDGPU_GOTPCREL32_LO
  - R_AMDGPU_GOTPCREL32_HI
  - R_AMDGPU_REL32_LO
  - R_AMDGPU_REL32_HI

AMDGPU isa only supports 32-bit immediates. In order to access 64-bit address we need to generate 32-bit lo/hi relocations, and do the right math (separate patch). Currently we only generate one 32 bit relocation for lower bits for each access, losing higher bits. Hence we need relocations listed above.

Differential Revision: https://reviews.llvm.org/D25546

llvm-svn: 284191
2016-10-14 04:03:49 +00:00
Mehdi Amini e1f094546d Add `llvm::` in clEnumVal macro (NFC)
This allows to use llvm🆑:opt without `using namespace llvm;`

llvm-svn: 284190
2016-10-14 03:54:46 +00:00
Eric Fiselier e58b4672ad Add 3.9 symbol list for OS X
llvm-svn: 284189
2016-10-14 02:55:43 +00:00
Eric Fiselier 5efb3093a5 Fix CMake configuration error and add ABI lists for OS X.
The primary reason for this patch is to add the OS X ABI lists for 3.9 and
ToT.

However while working on that I discovered that we incorrectly
exported the libc++abi symbols. Previously we had chosen the wrong CMake
configuration path and that caused us to re-export the c++abi binary instead
of using the symbol lists.

llvm-svn: 284188
2016-10-14 02:55:19 +00:00
Richard Smith 33d88ea4f5 Fix bogus assert breaking modules self-host.
llvm-svn: 284187
2016-10-14 02:35:11 +00:00
Eric Fiselier 4d968d356f Add OS X abi list
llvm-svn: 284186
2016-10-14 02:32:54 +00:00
Eric Fiselier 78659cdf47 Add ABI Changelog and current symbol list for Linux
llvm-svn: 284185
2016-10-14 02:27:44 +00:00
Richard Smith 869d37e333 Use SubstInitializer instead of SubstExpr when instantiating a default
argument, in order to correctly instantiate the initializer.

llvm-svn: 284184
2016-10-14 01:12:20 +00:00
Jim Ingham f70847deef This test passes on i386 now.
llvm-svn: 284183
2016-10-14 01:11:19 +00:00
Jim Ingham f5afb8bd80 This test is passing on i386 now.
llvm-svn: 284182
2016-10-14 01:03:03 +00:00