Commit Graph

281823 Commits

Author SHA1 Message Date
Jason Molenda 35eb6c856a Turn off the deprecated ALWAYS_SEARCH_USER_PATHS feature
in debugserver.  This is already set this way in the lldb
project files but not in debugserver.  Updating for
consistency.

llvm-svn: 324158
2018-02-03 00:37:46 +00:00
Sam Clegg f0d433d0c6 [WebAssembly] Refactor linker-generated symbols. NFC.
Group all synthetic symbols in the in single struct to match
the ELF linker.

This change is part of a larger change to add more linker
symbols such as `_end` and `_edata`.

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

llvm-svn: 324157
2018-02-02 22:59:56 +00:00
Jason Molenda 37713073d6 Fix a copy of a fixed length, possibly non-nul terminated, string
into a std::string so we don't run off the end of the array when
there is no nul byte in ProcessElfCore::parseLinuxNotes.  
Found with ASAN testing.

<rdar://problem/37134319> 

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

llvm-svn: 324156
2018-02-02 22:48:45 +00:00
Rui Ueyama 7a64a3d59c Simplify.
llvm-svn: 324155
2018-02-02 22:48:09 +00:00
Rui Ueyama edd4ec54d6 Update Eq so that it uses NAME just like B does. NFC.
llvm-svn: 324154
2018-02-02 22:45:47 +00:00
Eric Fiselier bfbafa541a Fix has_unique_object_representation after Clang commit r324134.
Clang previously reported an empty union as having a unique object
representation. This was incorrect and was fixed in a recent Clang commit.

This patch fixes the libc++ tests.

llvm-svn: 324153
2018-02-02 22:39:59 +00:00
Richard Smith 60707939de Fix incorrect usage of std::is_assignable.
We want to check that we can assign to an lvalue here, not a prvalue.

llvm-svn: 324152
2018-02-02 22:29:54 +00:00
Richard Smith e303e3523a Add missing direct-init / parameter-declaration-clause disambiguation when
parsing a trailing-return-type of a (function pointer) variable declaration.

llvm-svn: 324151
2018-02-02 22:24:54 +00:00
Rui Ueyama 6a8e79b8e5 Add -{no,}-check-sections flags to enable/disable section overlchecking
GNU linkers have this option.

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

llvm-svn: 324150
2018-02-02 22:24:06 +00:00
Daniel Neilson 38af2eed51 [InstCombine] Use getDestAlignment in SimplifyMemSet (NFC)
Summary:
Small NFC change to change the name of the function used getting and setting
the alignment of a memset.

llvm-svn: 324148
2018-02-02 22:03:03 +00:00
Craig Topper fae8788cfa [X86] Prefer to create a ISD::SETCC over X86ISD::PCMPEQ in combineVectorSizedSetCCEquality.
This is running pre-legalize, we should try to use target independent nodes. This will give the best opportunity for target independent optimizations.

llvm-svn: 324147
2018-02-02 21:59:46 +00:00
Rui Ueyama f46d3d1be9 Strip .note.gnu.build-id sections if --build-id is given.
Differential Revision: https://reviews.llvm.org/D42823

llvm-svn: 324146
2018-02-02 21:56:24 +00:00
Rui Ueyama aad2e328b9 Add --no-gnu-unique and --no-undefined-version for completeness.
Differential Revision: https://reviews.llvm.org/D42865

llvm-svn: 324145
2018-02-02 21:44:06 +00:00
Sanjay Patel a767ee5af0 [InstCombine] make sure tests are providing coverage for the stated pattern; NFC
Without extra instructions and uses, swapMayExposeCSEOpportunities() would change
the icmp (as seen in the check lines), so we were not actually testing patterns 
that should be handled by D41480.

llvm-svn: 324143
2018-02-02 21:40:54 +00:00
James Dennett 31a5734276 More documentation cleanup for Decl.h.
llvm-svn: 324142
2018-02-02 21:38:22 +00:00
Rui Ueyama 14f07a0ea5 Consolidate --foo and --no-foo options. NFC.
Differential Revision: https://reviews.llvm.org/D42859

llvm-svn: 324141
2018-02-02 21:25:51 +00:00
Kuba Mracek f1ddefb55f Use NULL instead of nullptr in invalid-pointer-pairs-compare-null.cc; nullptr is not available on older Darwin systems.
llvm-svn: 324136
2018-02-02 20:42:29 +00:00
Craig Topper 10aa254ecd [X86] Pass SDLoc by const reference in a few more places in X86ISelLowering.cpp. NFC
llvm-svn: 324135
2018-02-02 20:32:00 +00:00
Eric Fiselier 12a9f344c6 Make __has_unique_object_representations reject empty union types.
Summary:
Clang incorrectly reports empty unions as having a unique object representation. However, this is not correct since `sizeof(EmptyUnion) == 1` AKA it has 8 bits of padding. Therefore it should be treated the same as an empty struct and report `false`.

@erichkeane also suggested this fix should be merged into the 6.0 release branch, so the initial release of `__has_unique_object_representations` is as bug-free as possible. 

Reviewers: erichkeane, rsmith, aaron.ballman, majnemer

Reviewed By: erichkeane

Subscribers: cfe-commits, erichkeane

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

llvm-svn: 324134
2018-02-02 20:30:39 +00:00
James Dennett b8973efb3c Documentation cleanup, no functional change.
llvm-svn: 324133
2018-02-02 20:22:29 +00:00
Matt Morehouse d08e0a78c2 [clang-proto-to-cxx] Accept protobufs with missing fields.
libprotobuf-mutator accepts protobufs with missing fields, which means
clang-proto-fuzzer does as well.  clang-proto-to-cxx should match this
behavior.

llvm-svn: 324132
2018-02-02 20:22:20 +00:00
Ben Hamilton 4dc658ca52 [clang-format] New format param ObjCBinPackProtocolList
Summary:
This is an alternative approach to D42014 after some
investigation by stephanemoore@ and myself.

Previously, the format parameter `BinPackParameters` controlled both
C function parameter list bin-packing and Objective-C protocol conformance
list bin-packing.

We found in the Google style, some teams were changing
`BinPackParameters` from its default (`true`) to `false` so they could
lay out Objective-C protocol conformance list items one-per-line
instead of bin-packing them into as few lines as possible.

To allow teams to use one-per-line Objective-C protocol lists without
changing bin-packing for other areas like C function parameter lists,
this diff introduces a new LibFormat parameter
`ObjCBinPackProtocolList` to control the behavior just for ObjC
protocol conformance lists.

The new parameter is an enum which defaults to `Auto` to keep the
previous behavior (delegating to `BinPackParameters`).

Depends On D42649

Test Plan: New tests added. make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests

Reviewers: jolesiak, stephanemoore, djasper

Reviewed By: stephanemoore

Subscribers: Wizard, hokein, cfe-commits, klimek

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

llvm-svn: 324131
2018-02-02 20:15:14 +00:00
Craig Topper e7e147f52c [X86] Add avx512 command line to ptest.ll to demonstrate that 512-bit vectors are not handled by LowerVectorAllZeroTest.
llvm-svn: 324130
2018-02-02 20:12:45 +00:00
Craig Topper bd2f6e9570 Partially revert r324124 [X86] Add tests for missed opportunities to use ptest for all ones comparison.
Turns out I misunderstood the flag behavior of PTEST because I read the documentation for KORTEST which is different than PTEST/KTEST and made a bad assumption.

Keep the test rename though cause that's useful.

llvm-svn: 324129
2018-02-02 20:12:44 +00:00
Eric Fiselier 88df555d05 Emit label names according to -discard-value-names.
Summary:
Previously, Clang only emitted label names in assert builds.
However there is a CC1 option -discard-value-names that should have been used to control emission instead.
    
This patch removes the NDEBUG preprocessor block and instead allows LLVM to handle removing the names in accordance with the option.


Reviewers: erichkeane, aaron.ballman, majnemer

Reviewed By: aaron.ballman

Subscribers: cfe-commits

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

llvm-svn: 324127
2018-02-02 19:58:34 +00:00
Kuba Mracek 66ce45150f [asan] Make concurrent_overflow.cc less flaky
The "sleep(5)" sometimes times out on our bots, causing the test to fail. Let's use pthread_join.

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

llvm-svn: 324126
2018-02-02 19:49:24 +00:00
Aditya Nandakumar 58eb183128 [GISel][NFC]: Move RegisterBankInfo::getSizeInBits into TargetRegisterInfo.
llvm-svn: 324125
2018-02-02 19:42:07 +00:00
Craig Topper 9c936f88b1 [X86] Add tests for missed opportunities to use ptest for all ones comparison.
Also rename the test from pr12312.ll to ptest.ll so its more recognizable.

llvm-svn: 324124
2018-02-02 19:34:10 +00:00
Alex Denisov a07169e3cb Fix typo
llvm-svn: 324123
2018-02-02 19:20:37 +00:00
Sanjay Patel 1ea8697cdf [InstCombine] simplify logic for swapMayExposeCSEOpportunities; NFCI
llvm-svn: 324122
2018-02-02 19:08:12 +00:00
Kamil Rytarowski 78c9ac4dc5 Correct FileCheck usage in two newly added tests
llvm-svn: 324121
2018-02-02 18:48:15 +00:00
Kamil Rytarowski e6bba9bc6f Add new NetBSD interceptors: devname(3), devname_r(3)
Summary:
devname, devname_r - get device name

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, vitalybuka

Reviewed By: vitalybuka

Subscribers: kubamracek, llvm-commits, #sanitizers

Tags: #sanitizers

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

llvm-svn: 324120
2018-02-02 18:45:33 +00:00
Jim Ingham 40207d5064 Add the ability to restrict the breakpoint to a module
for run_to_{source,name}_breakpoint.

llvm-svn: 324119
2018-02-02 18:39:25 +00:00
Sanjay Patel 4ccae1cb2b [InstCombine] fix typos, formatting; NFC
llvm-svn: 324118
2018-02-02 18:39:05 +00:00
Adrian Prantl 34769d80dd Use an alternative approach to prevent Spotlight from indexing the build directory.
llvm-svn: 324115
2018-02-02 18:32:29 +00:00
George Karpenkov 78809e53cc [analyzer] [tests] Fix crash in SATestBuild.py
llvm-svn: 324114
2018-02-02 18:27:14 +00:00
Eric Liu 3a2cf8668f [Tooling] Returns non-zero status code when files are skipped.
Reviewers: hokein, bkramer

Reviewed By: bkramer

Subscribers: bkramer, klimek, cfe-commits

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

llvm-svn: 324113
2018-02-02 18:19:22 +00:00
Michael Kruse 1a745a4ef6 Run clang-format after r324003. NFC.
llvm-svn: 324112
2018-02-02 18:11:58 +00:00
Erik Pilkington 4f052d075c [demangler] Clean up the expression parser
This commit cleans up the expression parser, using a new style:
  - parse* functions now return Node pointers.
  - The mangled name is now held in Db and accessed with look() and consume()
  - LLVM coding style

This style is meant to avoid the 2 most common types of bugs in the
old demanger, namely misusing the Names stack (ie, calling back() on
empty) and going out of bounds on the mangled name. I also think it
makes the demangler a lot cleaner.

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

llvm-svn: 324111
2018-02-02 18:04:32 +00:00
Amara Emerson 3838ed0370 [AArch64][GlobalISel] Use getRegClassForTypeOnBank() in selectCopy.
Differential Revision: https://reviews.llvm.org/D42832

llvm-svn: 324110
2018-02-02 18:03:30 +00:00
Sanjay Patel 5b8cb26bcc [InstCombine] add baseline tests for unsigned saturated sub (D41480); NFC
llvm-svn: 324109
2018-02-02 17:43:16 +00:00
Rafael Espindola 9f34b7b93b Revert "Start setting dso_local in clang."
This reverts commit r324107.

I will have to test it on OS X.

llvm-svn: 324108
2018-02-02 17:29:22 +00:00
Rafael Espindola 7e34a308ff Start setting dso_local in clang.
This starts adding dso_local to clang.

The hope is to eventually have TargetMachine::shouldAssumeDsoLocal go
away. My objective for now is to move enough of it to clang to remove
the need for the TargetMachine one to handle PIE copy relocations and
-fno-plt. With that it should then be easy to implement a
-fno-copy-reloc in clang.

This patch just adds the cases where we assume a symbol to be local
based on the file being compiled for an executable or a shared
library.

llvm-svn: 324107
2018-02-02 17:17:39 +00:00
Craig Topper e538fc74d4 [X86] Remove checks for FeatureAVX512 from the X86 assembly parser. Remove mcpu/mattr from assembly test command lines.
Summary:
We should always be able to accept AVX512 registers and instructions in llvm-mc. The only subtarget mode that should be checked is 16-bit vs 32-bit vs 64-bit mode.

I've also removed all the mattr/mcpu lines from test RUN lines to be consistent with this. Most were due to AVX512, but a few were for other features.

Fixes PR36202

Reviewers: RKSimon, echristo, bkramer

Reviewed By: echristo

Subscribers: llvm-commits

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

llvm-svn: 324106
2018-02-02 17:02:58 +00:00
Sam McCall c40fdcdd7e [clangd] Fix ExternC test broken by r324081
llvm-svn: 324105
2018-02-02 17:01:36 +00:00
Fangrui Song 3823fc46f5 Make utils/UpdateTestChecks/common.py Python 2/3 compatible and fix print statements.
Subscribers: llvm-commits

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

llvm-svn: 324104
2018-02-02 16:41:07 +00:00
Yaxun Liu f5f45e5e63 [AMDGPU] Switch to the new addr space mapping by default
This requires corresponding llvm change.

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

llvm-svn: 324102
2018-02-02 16:08:24 +00:00
Yaxun Liu 2a22c5deff [AMDGPU] Switch to the new addr space mapping by default
This requires corresponding clang change.

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

llvm-svn: 324101
2018-02-02 16:07:16 +00:00
Clement Courbet a43e9653bb Add llc tests for comparison chains.
See https://reviews.llvm.org/D42793#996098 for context.

llvm-svn: 324099
2018-02-02 15:54:17 +00:00
Erich Keane 24e6840b9e [CodeGen][va_args] Correct Vector Struct va-arg 'in_reg' code gen
When trying to track down a different bug, we discovered
that calling __builtin_va_arg on a vec3f type caused
the SROA pass to issue a warning that there was an illegal
access.

Further research showed that the vec3f type is
alloca'ed as size '12', but the _builtin_va_arg code
on x86_64 was always loading this out of registers as
{double, double}. Thus, the 2nd store into the vec3f
was storing in bytes 12-15!

This patch alters the original implementation which always
assumed {double, double} to use the actual coerced type
instead, so the LLVM-IR generated is a load/GEP/store of
a <2 x float> and a float, rather than a double and a double.

Tests were added for all combinations I could think of that
would fit in 2 FP registers, and all work exactly as expected.

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

llvm-svn: 324098
2018-02-02 15:53:35 +00:00