platform/upstream/llvm.git
9 years agoGating clang-fuzzer on the same conditions required to build the LLVMFuzzer library...
Aaron Ballman [Mon, 6 Apr 2015 16:10:32 +0000 (16:10 +0000)]
Gating clang-fuzzer on the same conditions required to build the LLVMFuzzer library. Otherwise, we can run into a situation where clang-fuzzer attempts to build, but its dependency was never built.

llvm-svn: 234170

9 years agoRemove unnecessary uses of AliasedSymbol.
Rafael Espindola [Mon, 6 Apr 2015 16:10:05 +0000 (16:10 +0000)]
Remove unnecessary uses of AliasedSymbol.

As pr19627 points out, every use of AliasedSymbol is likely a bug.

The main use was to avoid the oddity of a variable showing up as undefined. That
was fixed in r233995, which made these calls nops.

llvm-svn: 234169

9 years agoRemoving a spurious space; NFC.
Aaron Ballman [Mon, 6 Apr 2015 16:09:13 +0000 (16:09 +0000)]
Removing a spurious space; NFC.

llvm-svn: 234168

9 years ago[Mips] Guard modification of register usage masks by mutex
Simon Atanasyan [Mon, 6 Apr 2015 16:07:19 +0000 (16:07 +0000)]
[Mips] Guard modification of register usage masks by mutex

llvm-svn: 234167

9 years agotest: Move amd64 -> x86_64 translation to getArchitecture()
Ed Maste [Mon, 6 Apr 2015 15:50:48 +0000 (15:50 +0000)]
test: Move amd64 -> x86_64 translation to getArchitecture()

Rather than sprinkling this knowledge throughout the test suite, just
translate amd64 to x86_64 globally.

llvm-svn: 234166

9 years agoBe consistent when deciding if a relocation is needed.
Rafael Espindola [Mon, 6 Apr 2015 15:27:57 +0000 (15:27 +0000)]
Be consistent when deciding if a relocation is needed.

Before when deciding if we needed a relocation in A-B, we wore only checking
if A was weak.

This fixes the asymmetry.

The "InSet" argument should probably be renamed to "ForValue", since InSet is
very MachO specific, but doing so in this patch would make it hard to read.

This fixes PR22815.

llvm-svn: 234165

9 years agotest: Add amd64 architecture alias for x86_64
Ed Maste [Mon, 6 Apr 2015 15:23:21 +0000 (15:23 +0000)]
test: Add amd64 architecture alias for x86_64

64-bit x86 is called amd64 on FreeBSD.

llvm-svn: 234164

9 years ago[LinkerScript] Handle symbols defined in linker scripts in case of shared lib
Simon Atanasyan [Mon, 6 Apr 2015 15:15:01 +0000 (15:15 +0000)]
[LinkerScript] Handle symbols defined in linker scripts in case of shared lib

This patch is a follow-up to the rL232409 and allows define symbols
in a linker script in case of linking shared library.

llvm-svn: 234163

9 years ago[ELF] Use override keyword instead of virtual
Simon Atanasyan [Mon, 6 Apr 2015 15:09:39 +0000 (15:09 +0000)]
[ELF] Use override keyword instead of virtual

No functional changes.

llvm-svn: 234162

9 years agoDisable all link optimizations in a debug build.
Rafael Espindola [Mon, 6 Apr 2015 15:04:31 +0000 (15:04 +0000)]
Disable all link optimizations in a debug build.

This taking linking clang on my machine with gold from 16.980257914 to
15.933037649 seconds.

llvm-svn: 234161

9 years agoDon't pass -O3 to the linker in debug builds.
Rafael Espindola [Mon, 6 Apr 2015 14:51:01 +0000 (14:51 +0000)]
Don't pass -O3 to the linker in debug builds.

This takes linking clang in a debug build with gold form 19.518925697 to
16.406388685 seconds.

llvm-svn: 234160

9 years agoDon't use -ffunction-sections -fdata-sections on debug builds.
Rafael Espindola [Mon, 6 Apr 2015 14:34:43 +0000 (14:34 +0000)]
Don't use -ffunction-sections -fdata-sections on debug builds.

Unfortunately, on ELF there is not used attribute on the .o files,
so there is no easy way to keep the dump function alive.

If we are not gcing, we may as well produce non gcable files and
avoid the cost.

Linking a debug clang now takes 18.856225992 seconds, before it
took 21.206897447.

I will try avoiding --gc-sections -O3 on a followup patch.

llvm-svn: 234159

9 years agoTest commit. Improve comments in APInt. NFC.
Pawel Bylica [Mon, 6 Apr 2015 13:31:39 +0000 (13:31 +0000)]
Test commit. Improve comments in APInt. NFC.

llvm-svn: 234158

9 years ago[ELF] Use override keyword instead of virtual
Simon Atanasyan [Mon, 6 Apr 2015 13:26:15 +0000 (13:26 +0000)]
[ELF] Use override keyword instead of virtual

No functional changes.

llvm-svn: 234157

9 years ago[ELF] Remove redundant forward class declarations
Simon Atanasyan [Mon, 6 Apr 2015 13:26:10 +0000 (13:26 +0000)]
[ELF] Remove redundant forward class declarations

No functional changes.

llvm-svn: 234156

9 years ago[Mips] Remove redundant non-template MipsRelocationHandler class
Simon Atanasyan [Mon, 6 Apr 2015 13:26:04 +0000 (13:26 +0000)]
[Mips] Remove redundant non-template MipsRelocationHandler class

llvm-svn: 234155

9 years ago[Mips] Replace MipsRelocationHandler::readAddend() by a regular function
Simon Atanasyan [Mon, 6 Apr 2015 13:25:58 +0000 (13:25 +0000)]
[Mips] Replace MipsRelocationHandler::readAddend() by a regular function

The readAddend() does not depend on MipsRelocationHandler and should not
be its member function.

llvm-svn: 234154

9 years ago[Mips] Reformat the code with clang-format
Simon Atanasyan [Mon, 6 Apr 2015 13:25:52 +0000 (13:25 +0000)]
[Mips] Reformat the code with clang-format

llvm-svn: 234153

9 years agoHasSideEffects() should return false for calls to pure and const functions.
Michael Kuperstein [Mon, 6 Apr 2015 13:22:01 +0000 (13:22 +0000)]
HasSideEffects() should return false for calls to pure and const functions.

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

llvm-svn: 234152

9 years agoMinor follow-up fix to r234150
Timur Iskhodzhanov [Mon, 6 Apr 2015 12:54:06 +0000 (12:54 +0000)]
Minor follow-up fix to r234150

llvm-svn: 234151

9 years ago[ASan] Unify handling of loaded modules between POSIX and Windows
Timur Iskhodzhanov [Mon, 6 Apr 2015 12:49:30 +0000 (12:49 +0000)]
[ASan] Unify handling of loaded modules between POSIX and Windows

Reviewed at http://reviews.llvm.org/D8805

llvm-svn: 234150

9 years agoUpdate our list of distros a bit.
Benjamin Kramer [Mon, 6 Apr 2015 12:30:43 +0000 (12:30 +0000)]
Update our list of distros a bit.

- Debian jessie will be released this month, add the next testing version to the list.
- RHEL7 was released last june.
- Ubuntu utopic was released last october, vivid will follow later this month.

llvm-svn: 234149

9 years agoAdd hard float versions of FP to LL conversions
Sergey Dmitrouk [Mon, 6 Apr 2015 11:54:51 +0000 (11:54 +0000)]
Add hard float versions of FP to LL conversions

This adds hard-float implementation for the following builtins:

* __fixdfdi()
* __fixsfdi()
* __fixunsdfdi()
* __fixunssfdi()

The soft-float implementation does never raise floating point
exceptions, which doesn't allow clients to detect floating point
conversion errors.

I must mention that I had to refer to libgcc's implementation to
write these functions.

Related unit-tests of compiler-rt passed with these changes.

Patch was somewhat out-dated, so was updated locally without any
functional changes.

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

llvm-svn: 234148

9 years ago[ASan] Do not print thread IDs and stacks for unknown threads.
Alexander Potapenko [Mon, 6 Apr 2015 10:32:45 +0000 (10:32 +0000)]
[ASan] Do not print thread IDs and stacks for unknown threads.

llvm-svn: 234147

9 years agoclang/test/Profile/profile-does-not-exist.c: Avoid checking a message line in the...
NAKAMURA Takumi [Mon, 6 Apr 2015 08:16:36 +0000 (08:16 +0000)]
clang/test/Profile/profile-does-not-exist.c: Avoid checking a message line in the message catalog.

llvm-svn: 234146

9 years agotsan: fix munmap interceptor
Dmitry Vyukov [Mon, 6 Apr 2015 07:57:32 +0000 (07:57 +0000)]
tsan: fix munmap interceptor

MetaMap::ResetRange/FreeRange rounds the range up to at least kMetaShadowSize.
This is requried for e.g. free(malloc(0)). However, munmap returns EINVAL
and do not unmap any memory when length arguments is equal to 0.
So don't free meta shadow in this case as well.

llvm-svn: 234145

9 years ago[AArch64] Fix error in AARCH64_ADR_GOT_PAGE handler
Denis Protivensky [Mon, 6 Apr 2015 07:44:59 +0000 (07:44 +0000)]
[AArch64] Fix error in AARCH64_ADR_GOT_PAGE handler

The error was introduced during mechanical replacement
of raw memory reads/writes to use readxxle/writexxle functions
in r230725.

Noted and fixed by Suprateeka R Hegde <hegdesmailbox@gmail.com>

llvm-svn: 234144

9 years agoThis reverts commit r234104, bringing back 233393 now that ARM is fixed.
Rafael Espindola [Mon, 6 Apr 2015 04:36:45 +0000 (04:36 +0000)]
This reverts commit r234104, bringing back  233393 now that ARM is fixed.

Original message:

Don't use unique section names by default if using the integrated as.

This saves some IO and ccache space by not creating long section names. It
should work with every ELF linker.

llvm-svn: 234143

9 years agoStore the sh_link of ARM_EXIDX directly in MCSectionELF.
Rafael Espindola [Mon, 6 Apr 2015 04:25:18 +0000 (04:25 +0000)]
Store the sh_link of ARM_EXIDX directly in MCSectionELF.

This avoids some pretty horrible and broken name based section handling.

llvm-svn: 234142

9 years agoDon't crash when passing a non-existent file to -fprofile-instr-use=.
Nico Weber [Mon, 6 Apr 2015 04:16:48 +0000 (04:16 +0000)]
Don't crash when passing a non-existent file to -fprofile-instr-use=.

Fixes a regression from r229434.

llvm-svn: 234141

9 years agoSimplify this function a bit. NFC.
Rafael Espindola [Mon, 6 Apr 2015 03:16:51 +0000 (03:16 +0000)]
Simplify this function a bit. NFC.

The case values are not a tidy enum we can fully cover. They even ovelap
over the various extension.

Just use a default:

llvm-svn: 234140

9 years agoSimplify mapping from relocation sections to relocated sections.
Rafael Espindola [Mon, 6 Apr 2015 03:09:30 +0000 (03:09 +0000)]
Simplify mapping from relocation sections to relocated sections.

Just store the section in MCSectionELF. This avoids multiple hash lookups.

This will also be used by ARM_EXIDX.

llvm-svn: 234139

9 years ago[Orc] Tidy up the assembly for the x86-64 resolver block.
Lang Hames [Mon, 6 Apr 2015 03:01:29 +0000 (03:01 +0000)]
[Orc] Tidy up the assembly for the x86-64 resolver block.

llvm-svn: 234138

9 years agoAdd documentation for llgoi, update README
Peter Collingbourne [Sun, 5 Apr 2015 23:32:13 +0000 (23:32 +0000)]
Add documentation for llgoi, update README

llvm-svn: 234137

9 years agoRoll gofrontend to 15a24202fa42.
Peter Collingbourne [Sun, 5 Apr 2015 23:32:10 +0000 (23:32 +0000)]
Roll gofrontend to 15a24202fa42.

Takes us to Go 1.4.2 plus a number of bug fixes.

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

llvm-svn: 234136

9 years agoRoll gofrontend to 07baa07598ea; roll libffi to r219477.
Peter Collingbourne [Sun, 5 Apr 2015 23:31:49 +0000 (23:31 +0000)]
Roll gofrontend to 07baa07598ea; roll libffi to r219477.

Incorporates https://codereview.appspot.com/198770044, which causes us to start
using the static chain register for closures instead of __go_{get,set}_closure.

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

llvm-svn: 234135

9 years agoRoll gofrontend to a6e10414311a
Peter Collingbourne [Sun, 5 Apr 2015 23:30:42 +0000 (23:30 +0000)]
Roll gofrontend to a6e10414311a

This takes us to Go 1.4. Also includes a couple of changes to the test
suite, both in the runtime package:

- Disable TestSetPanicOnFault. We cannot support this scenario at all,
  due to LLVM's lack of non-call exceptions.

- Tweak TestFinalizerType. This test only passes with two GC runs.

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

llvm-svn: 234134

9 years agoRoll gotools to d4e70101.
Peter Collingbourne [Sun, 5 Apr 2015 23:28:18 +0000 (23:28 +0000)]
Roll gotools to d4e70101.

Most importantly, this gives us https://go-review.googlesource.com/7533 which
fixes a bug in go/ssa that caused test failures in the Go 1.4 standard library.

Also remove the go1.4 tag workaround. We no longer need it now that we
ship llgo-go.

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

llvm-svn: 234133

9 years ago[opaque pointer type] Remove some backwards compatible GEP APIs
David Blaikie [Sun, 5 Apr 2015 22:53:21 +0000 (22:53 +0000)]
[opaque pointer type] Remove some backwards compatible GEP APIs

Just doing the two-step so I don't get so much build-bot spam... (add
new API, migrate callers, remove old API)

llvm-svn: 234132

9 years ago[opaque pointer type] More GEP API migrations
David Blaikie [Sun, 5 Apr 2015 22:51:12 +0000 (22:51 +0000)]
[opaque pointer type] More GEP API migrations

llvm-svn: 234131

9 years agoStrip .strtab and .symtab when --strip-all is used.
Davide Italiano [Sun, 5 Apr 2015 22:47:54 +0000 (22:47 +0000)]
Strip .strtab and .symtab when --strip-all is used.
This matches other linkers behaviour. Moreover, there's really
no need to keep them around.

Reported by: Rafael Avila de Espindola

PR: 22890
llvm-svn: 234130

9 years agoclang-format my last commit
David Blaikie [Sun, 5 Apr 2015 22:47:07 +0000 (22:47 +0000)]
clang-format my last commit

(sorry, keep forgetting that)

llvm-svn: 234129

9 years ago[opaque pointer type] More GEP API migrations
David Blaikie [Sun, 5 Apr 2015 22:45:47 +0000 (22:45 +0000)]
[opaque pointer type] More GEP API migrations

Looks like the VTable code in particular will need some work to pass
around the pointee type explicitly.

llvm-svn: 234128

9 years agoclang-format my last commit
David Blaikie [Sun, 5 Apr 2015 22:44:57 +0000 (22:44 +0000)]
clang-format my last commit

llvm-svn: 234127

9 years ago[opaque pointer type] The last of the GEP IRBuilder API migrations
David Blaikie [Sun, 5 Apr 2015 22:41:44 +0000 (22:41 +0000)]
[opaque pointer type] The last of the GEP IRBuilder API migrations

There's still lots of callers passing nullptr, of course - some because
they'll never be migrated (InstCombines for bitcasts - well they don't
make any sense when the pointer type is opaque anyway, for example) and
others that will need more engineering to pass Types around.

llvm-svn: 234126

9 years agoMake -polly-no-tiling work again
Tobias Grosser [Sun, 5 Apr 2015 21:52:21 +0000 (21:52 +0000)]
Make -polly-no-tiling work again

llvm-svn: 234125

9 years agoAdjust documentation to old -enable-polly-openmp -> -polly-parallel rename
Tobias Grosser [Sun, 5 Apr 2015 19:52:38 +0000 (19:52 +0000)]
Adjust documentation to old -enable-polly-openmp -> -polly-parallel rename

Reported-by: Tomofumi Yuki <tomofumi.yuki@gmail.com>
llvm-svn: 234124

9 years agoReplace copy loop with std::copy.
Benjamin Kramer [Sun, 5 Apr 2015 18:55:02 +0000 (18:55 +0000)]
Replace copy loop with std::copy.

No functional change intended.

llvm-svn: 234123

9 years agoSign-extend in case of non-matching bitwidth
Tobias Grosser [Sun, 5 Apr 2015 17:36:42 +0000 (17:36 +0000)]
Sign-extend in case of non-matching bitwidth

This change ensures that we sign-extend integer types in case non-matching
operands are encountered when generating a multi-dimensional access offset.

This fixes http://llvm.org/PR23124

Reported-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
llvm-svn: 234122

9 years agoMark BumpPtrAllocator::Allocate as returning a noalias pointer.
Benjamin Kramer [Sun, 5 Apr 2015 17:02:25 +0000 (17:02 +0000)]
Mark BumpPtrAllocator::Allocate as returning a noalias pointer.

The GCC attribute is curiously named 'malloc', but I think it's better
to use LLVM terminology for the wrapper macro.

llvm-svn: 234121

9 years ago[elf] Fix a silly memory leak. std::string has a non-trivial dtor.
Benjamin Kramer [Sun, 5 Apr 2015 15:53:20 +0000 (15:53 +0000)]
[elf] Fix a silly memory leak. std::string has a non-trivial dtor.

llvm-svn: 234120

9 years agoDo not assume all multi-parameter products are affine
Tobias Grosser [Sun, 5 Apr 2015 14:57:50 +0000 (14:57 +0000)]
Do not assume all multi-parameter products are affine

As soon as one operand of the product is invalid, the entire product is invalid.
This happens for example if one of the operands is not loop-invariant.

This fixes http://llvm.org/PR23125

Reported-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com
llvm-svn: 234119

9 years ago[DAGCombiner] Merge FMUL Scalar and Vector constant canonicalization to RHS. NFCI.
Simon Pilgrim [Sun, 5 Apr 2015 14:30:37 +0000 (14:30 +0000)]
[DAGCombiner] Merge FMUL Scalar and Vector constant canonicalization to RHS. NFCI.

llvm-svn: 234118

9 years agoMake run-time alias check generation deterministic
Tobias Grosser [Sun, 5 Apr 2015 13:11:54 +0000 (13:11 +0000)]
Make run-time alias check generation deterministic

llvm-svn: 234117

9 years ago[Mips] Rename MipsLinkingContext class method
Simon Atanasyan [Sun, 5 Apr 2015 09:01:53 +0000 (09:01 +0000)]
[Mips] Rename MipsLinkingContext class method

getMergeReginfoMask => getMergedReginfoMask

llvm-svn: 234116

9 years ago[Mips] Support writing .MIPS.options section into the linked file
Simon Atanasyan [Sun, 5 Apr 2015 09:01:46 +0000 (09:01 +0000)]
[Mips] Support writing .MIPS.options section into the linked file

In case of MIPS N64 ABI linker should merge registers usage masks stored
in the input .MIPS.options sections and save result into the output
.MIPS.options section.

llvm-svn: 234115

9 years ago[Mips] Add checking of .reginfo section options to the test case
Simon Atanasyan [Sun, 5 Apr 2015 09:01:35 +0000 (09:01 +0000)]
[Mips] Add checking of .reginfo section options to the test case

llvm-svn: 234114

9 years agoDo not use the POLLY vector code generator if only strip-mining is requested
Tobias Grosser [Sun, 5 Apr 2015 06:53:21 +0000 (06:53 +0000)]
Do not use the POLLY vector code generator if only strip-mining is requested

This fixes http://llvm.org/PR23127

Reported-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
llvm-svn: 234113

9 years ago[tests] Use -polly-vectorizer=polly directly
Tobias Grosser [Sun, 5 Apr 2015 06:53:11 +0000 (06:53 +0000)]
[tests] Use -polly-vectorizer=polly directly

instead of defining a lit variable %vector-opt.

llvm-svn: 234112

9 years agoSwitch test from wchar_t to char32_t
David Majnemer [Sun, 5 Apr 2015 05:42:02 +0000 (05:42 +0000)]
Switch test from wchar_t to char32_t

Windows has a 16-bit wchar_t, most Unix platforms have a 32-bit wchar_t.
Use a char32_t to keep the test's output stable.

llvm-svn: 234111

9 years ago[AST] String literal operator templates have two template args, not one
David Majnemer [Sun, 5 Apr 2015 05:32:54 +0000 (05:32 +0000)]
[AST] String literal operator templates have two template args, not one

StmtPrinter assumed that the first template arg was the pack and
attempted to iterate it.  However, the GNU extension (which is really
just N3599), has two template arguments.  In this case, the second
argument is the pack containing the string contents.

Handle this by desugaring the call to the explicit operator.

For example:
"qux" _zombocom will be shown as
operator "" _zombocom<char, 'q', 'u', 'x'>() in diagnostics and AST
dumps.

N.B.  It is actually impossible to render the arguments back to the
source form without storing more information in the AST.  For example,
we cannot tell if the user wrote u8"qux" or "qux".  We also lose
fidelity when it comes to non-char types for this exact reason (e.g. it
is hard to render a list of wchar_t back to something that can be
printed to the screen even if you don't have to consider surrogate
pairs).

This fixes PR23120.

llvm-svn: 234110

9 years ago[opaque pointer type] More GEP API migrations
David Blaikie [Sat, 4 Apr 2015 21:07:17 +0000 (21:07 +0000)]
[opaque pointer type] More GEP API migrations

llvm-svn: 234109

9 years ago[opaque pointer type] More GEP API migrations
David Blaikie [Sat, 4 Apr 2015 21:07:10 +0000 (21:07 +0000)]
[opaque pointer type] More GEP API migrations

llvm-svn: 234108

9 years agoremove function/variable names from comments; NFC
Sanjay Patel [Sat, 4 Apr 2015 21:06:39 +0000 (21:06 +0000)]
remove function/variable names from comments; NFC

llvm-svn: 234107

9 years agoless space; NFC
Sanjay Patel [Sat, 4 Apr 2015 21:05:52 +0000 (21:05 +0000)]
less space; NFC

llvm-svn: 234106

9 years ago[Mips] Do not use array initializer to fix Windows build bots
Simon Atanasyan [Sat, 4 Apr 2015 19:48:29 +0000 (19:48 +0000)]
[Mips] Do not use array initializer to fix Windows build bots

llvm-svn: 234105

9 years agoRevert "Revert "Revert "Don't use unique section names by default if using the integr...
Rafael Espindola [Sat, 4 Apr 2015 19:32:41 +0000 (19:32 +0000)]
Revert "Revert "Revert "Don't use unique section names by default if using the integrated as."""

This reverts commit r234101. I will debug what went wrong with ARM.

llvm-svn: 234104

9 years ago[Mips] Support writing .reginfo section into the linked file
Simon Atanasyan [Sat, 4 Apr 2015 19:13:32 +0000 (19:13 +0000)]
[Mips] Support writing .reginfo section into the linked file

In case of MIPS O32 ABI linker should merge registers usage masks stored
in the input .reginfo sections and save result into the output .reginfo
section.

The ABI states that the .reginfo section should be put into the separate
segment. This requirement is not implemented in this patch.

llvm-svn: 234103

9 years agoCopy paste error in gdb-remote doc.
Chaoren Lin [Sat, 4 Apr 2015 19:09:18 +0000 (19:09 +0000)]
Copy paste error in gdb-remote doc.

llvm-svn: 234102

9 years agoRevert "Revert "Don't use unique section names by default if using the integrated...
Rafael Espindola [Sat, 4 Apr 2015 18:21:14 +0000 (18:21 +0000)]
Revert "Revert "Don't use unique section names by default if using the integrated as.""

This reverts commit r233398, bringing back 233393 now that LLVM is fixed.

Original message:

Don't use unique section names by default if using the integrated as.

This saves some IO and ccache space by not creating long section names. It
should work with every ELF linker.

llvm-svn: 234101

9 years agoDon't mix overload and default values.
Rafael Espindola [Sat, 4 Apr 2015 18:16:01 +0000 (18:16 +0000)]
Don't mix overload and default values.

It makes it hard to see which one is being called.

llvm-svn: 234100

9 years agoImplement unique sections with an unique ID.
Rafael Espindola [Sat, 4 Apr 2015 18:02:01 +0000 (18:02 +0000)]
Implement unique sections with an unique ID.

This allows the compiler/assembly programmer to switch back to a
section. This in turn fixes the bootstrap failure on powerpc (tested
on gcc110) without changing the ppc codegen at all.

I will try to cleanup the various getELFSection overloads in a  followup patch.
Just using a default argument now would lead to ambiguities.

llvm-svn: 234099

9 years agoRemove one more empty directory.
Simon Atanasyan [Sat, 4 Apr 2015 15:25:19 +0000 (15:25 +0000)]
Remove one more empty directory.

llvm-svn: 234098

9 years ago[opaque pointer type] more GEP API migrations
David Blaikie [Sat, 4 Apr 2015 15:12:29 +0000 (15:12 +0000)]
[opaque pointer type] more GEP API migrations

llvm-svn: 234097

9 years ago[opaque pointer type] More (constant, in this instance) GEP API migrations
David Blaikie [Sat, 4 Apr 2015 15:12:13 +0000 (15:12 +0000)]
[opaque pointer type] More (constant, in this instance) GEP API migrations

llvm-svn: 234096

9 years agoRemove empty directories.
Simon Atanasyan [Sat, 4 Apr 2015 15:10:17 +0000 (15:10 +0000)]
Remove empty directories.

llvm-svn: 234095

9 years ago[clang-tidy] Added a couple of tests for misc-static-assert.
Alexander Kornienko [Sat, 4 Apr 2015 14:54:53 +0000 (14:54 +0000)]
[clang-tidy] Added a couple of tests for misc-static-assert.

llvm-svn: 234094

9 years agoRemove the cl-no-signed-zeros cc1 option
Sanjay Patel [Sat, 4 Apr 2015 14:54:24 +0000 (14:54 +0000)]
Remove the cl-no-signed-zeros cc1 option

Use the driver flag -fno-signed-zeros instead.

This was recommended but not implemented in D6873:
http://reviews.llvm.org/D6873

which was checked in at r226915:
http://reviews.llvm.org/rL226915

llvm-svn: 234093

9 years ago[DAGCombiner] Canonicalize vector constants for ADD/MUL/AND/OR/XOR re-association
Simon Pilgrim [Sat, 4 Apr 2015 10:20:31 +0000 (10:20 +0000)]
[DAGCombiner] Canonicalize vector constants for ADD/MUL/AND/OR/XOR re-association

Scalar integers are commuted to move constants to the RHS for re-association - this ensures vectors do the same.

llvm-svn: 234092

9 years agoclang-format: [JS] Understand object literals with only methods.
Daniel Jasper [Sat, 4 Apr 2015 07:56:55 +0000 (07:56 +0000)]
clang-format: [JS] Understand object literals with only methods.

Before:
  let theObject = {someMethodName() {
    doTheThing();
    doTheOtherThing();
  },
                   someOtherMethodName() {
                     doSomething();
                     doSomethingElse();
                   }};

After:
  let theObject = {
    someMethodName() {
      doTheThing();
      doTheOtherThing();
    },
    someOtherMethodName() {
      doSomething();
      doSomethingElse();
    }
  };

llvm-svn: 234091

9 years ago[MS ABI] A pointer-to-function cannot be caught as a pointer-to-void
David Majnemer [Sat, 4 Apr 2015 05:37:48 +0000 (05:37 +0000)]
[MS ABI] A pointer-to-function cannot be caught as a pointer-to-void

Don't assume that all pointers are convertible to void pointer.
Instead correctly respect [conv.ptr]p2; only allow pointer types with an
object pointee type to be caught as pointer-to-void.

llvm-svn: 234090

9 years ago[Hexagon] Remove duplicated typedef
Simon Atanasyan [Sat, 4 Apr 2015 05:19:58 +0000 (05:19 +0000)]
[Hexagon] Remove duplicated typedef

The `HexagonELFType` is declared in the HexagonLinkingContext.h.

llvm-svn: 234089

9 years ago[Hexagon][Mips] Rename template arguments <arch>ELFType to ELFT
Simon Atanasyan [Sat, 4 Apr 2015 05:19:51 +0000 (05:19 +0000)]
[Hexagon][Mips] Rename template arguments <arch>ELFType to ELFT

In all other ELF related classes we use `ELFT` abbreviation.

llvm-svn: 234088

9 years agoELF: Use short variable names in <Arch>RelocationHandlers.cpp.
Rui Ueyama [Sat, 4 Apr 2015 04:22:27 +0000 (04:22 +0000)]
ELF: Use short variable names in <Arch>RelocationHandlers.cpp.

Functions in the files are hard to read because of line wrapping.
Use shorter names for local variables so that the lines fit
within 80 columns.

llvm-svn: 234087

9 years ago[X86] Apply AddedComplexity consistently for similar patterns. This keeps them togeth...
Craig Topper [Sat, 4 Apr 2015 04:22:12 +0000 (04:22 +0000)]
[X86] Apply AddedComplexity consistently for similar patterns. This keeps them together in the DAGISel tables and reduces table size slightly.

llvm-svn: 234086

9 years agoRemove redundant anonymous namespace.
Rui Ueyama [Sat, 4 Apr 2015 04:10:08 +0000 (04:10 +0000)]
Remove redundant anonymous namespace.

llvm-svn: 234085

9 years agoFix formatting and coding style.
Eric Christopher [Sat, 4 Apr 2015 03:53:25 +0000 (03:53 +0000)]
Fix formatting and coding style.

llvm-svn: 234084

9 years agoComplete comment. Reflow conditional.
Eric Christopher [Sat, 4 Apr 2015 03:34:43 +0000 (03:34 +0000)]
Complete comment. Reflow conditional.

llvm-svn: 234083

9 years agoELF: Merge ELFTargets.h with ELFLinkingContext.h.
Rui Ueyama [Sat, 4 Apr 2015 03:24:42 +0000 (03:24 +0000)]
ELF: Merge ELFTargets.h with ELFLinkingContext.h.

These functions are "constructors" of the LinkingContexts. We already
have auxiliary classes and functions for ELFLinkingContext in the header.
They fall in the same category.

llvm-svn: 234082

9 years agoELF: Return TargetRelocationHandler instead of <ArcH>TargetRelocationHandler.
Rui Ueyama [Sat, 4 Apr 2015 02:59:52 +0000 (02:59 +0000)]
ELF: Return TargetRelocationHandler instead of <ArcH>TargetRelocationHandler.

getRelocationHandler is a public interface to get an instance of
TargetRelocationHandler. We don't use any member function other than
applyRelocations to a returned instance. Returning a base class instance
suffices here. (If a return type is a derived class, it looks like we were
using derived classes features.)

llvm-svn: 234081

9 years agoRemove a parameter for file extension from canParse.
Rui Ueyama [Sat, 4 Apr 2015 02:44:36 +0000 (02:44 +0000)]
Remove a parameter for file extension from canParse.

canParse took three parameters -- file magic, filename extension and
memory buffer. All but YAMLReader ignored the second parameter.
This patch removes the parameter.

llvm-svn: 234080

9 years ago[X86] Add a comment about the change in r234075.
Craig Topper [Sat, 4 Apr 2015 02:31:43 +0000 (02:31 +0000)]
[X86] Add a comment about the change in r234075.

llvm-svn: 234079

9 years agoStrip trailing whitespace and reword explanatory comment.
Eric Christopher [Sat, 4 Apr 2015 02:26:47 +0000 (02:26 +0000)]
Strip trailing whitespace and reword explanatory comment.

llvm-svn: 234078

9 years agoELF: Make private members private.
Rui Ueyama [Sat, 4 Apr 2015 02:26:17 +0000 (02:26 +0000)]
ELF: Make private members private.

llvm-svn: 234077

9 years agoELF: Remove ELF{Object,DSO}Reader alias templates.
Rui Ueyama [Sat, 4 Apr 2015 02:16:26 +0000 (02:16 +0000)]
ELF: Remove ELF{Object,DSO}Reader alias templates.

Because of the previous change (r234074), ELFObjectReader became just
an alias for ELFReader. We can replace all occurrences of ELFObjectReader
with ELFReader.

In this patch, I also replaced ELFDSOReader to remove the alias template.

llvm-svn: 234076

9 years ago[X86] Don't use GR64 register 'and with immediate' instructions if the immediate...
Craig Topper [Sat, 4 Apr 2015 02:08:20 +0000 (02:08 +0000)]
[X86] Don't use GR64 register 'and with immediate' instructions if the immediate is zero in the upper 33-bits or upper 57-bits. Use GR32 instructions instead.

Previously the patterns didn't have high enough priority and we would only use the GR32 form if the only the upper 32 or 56 bits were zero.

Fixes PR23100.

llvm-svn: 234075

9 years agoELF: Teach File classes about their file magics.
Rui Ueyama [Sat, 4 Apr 2015 02:07:30 +0000 (02:07 +0000)]
ELF: Teach File classes about their file magics.

So that we can remove one template parameter from ELFReader.
ELF port is heavily templatized, and I want to reduce the usage
where possible.

llvm-svn: 234074

9 years agos/context/ctx/g on lib/Driver/Driver.cpp.
Rui Ueyama [Sat, 4 Apr 2015 01:37:25 +0000 (01:37 +0000)]
s/context/ctx/g on lib/Driver/Driver.cpp.

llvm-svn: 234073

9 years agoRemove unused member function declarations.
Rui Ueyama [Sat, 4 Apr 2015 01:37:23 +0000 (01:37 +0000)]
Remove unused member function declarations.

llvm-svn: 234072

9 years agoUse insert instead of append when adding to sys.path.
Chaoren Lin [Sat, 4 Apr 2015 01:11:31 +0000 (01:11 +0000)]
Use insert instead of append when adding to sys.path.

Similar problem as in the last part of r200486.

llvm-svn: 234071