Commit Graph

185437 Commits

Author SHA1 Message Date
Daniel Jasper e068ac77a2 clang-format: Don't break after very short return types.
Before:
  void
  SomeFunction(int parameter);

After:
  void SomeFunction(
      int parameter);

(Unless AlwaysBreakAfterDefinitionReturnType after type is set).

llvm-svn: 220686
2014-10-27 17:13:59 +00:00
Saleem Abdulrasool 1f060a8552 clang-format: improve vim integration docs
Improve the documentation for vim integration of clang-format.  Prefer the use
of <c-o> to do the normal mode command execution to avoid side-effects of the
escape and re-insertion (cursor movement).  Tweak the macros to use a double
return to avoid having to manually return control to the editor from the
subprocess.

llvm-svn: 220685
2014-10-27 17:13:33 +00:00
Daniel Jasper 5634619389 clang-format: Fix bad merging of lines in nested blocks.
Before:
  SomeFunction([]() {
  #define A a
    return 43; });

After:
  SomeFunction([]() {
  #define A a
    return 43;
  });

llvm-svn: 220684
2014-10-27 16:31:46 +00:00
Adrian Prantl 44ed3d04bf Unbreak the darwin build.
Patch by Ismail Pazarbasi!

llvm-svn: 220683
2014-10-27 16:20:59 +00:00
Samuel Benzaquen 7af8800095 Speed up clang-tidy when profiling in on.
Summary:
Speed up clang-tidy when profiling in on.
It makes profiling runs twice as fast by reusing the time samples between the
different actions.
It also joins together the sampling of different matchers of the same check.

Reviewers: alexfh

Subscribers: klimek, cfe-commits

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

llvm-svn: 220682
2014-10-27 15:22:59 +00:00
Ed Maste 49e4068781 Skip ObjC test on FreeBSD that does not build
llvm-svn: 220681
2014-10-27 15:01:59 +00:00
Viktor Kutuzov d553bcff4f Allow thread sanitizer in clang driver on FreeBSD
http://reviews.llvm.org/D5999

llvm-svn: 220680
2014-10-27 13:51:25 +00:00
Daniel Jasper ce2fdb0a0a clang-format: [Proto] Change formatting text-formatted options.
Before:
  optional Type type = 1 [(mutate_options) = {vital : true
                                              abc : false}];

After:
  optional Type type = 1 [(mutate_options) = {
    vital : true
    abc : false
  }];

llvm-svn: 220679
2014-10-27 13:25:59 +00:00
NAKAMURA Takumi 729be14435 Prune CRLF.
llvm-svn: 220678
2014-10-27 12:37:26 +00:00
Viktor Kutuzov 64df1f177b Revert rL220675 due to failures on check-clang
llvm-svn: 220677
2014-10-27 12:33:10 +00:00
Viktor Kutuzov c8f3435f0e [Tsan] Enable thread sanitizer tests on FreeBSD
Differential Revision: http://reviews.llvm.org/D5995

llvm-svn: 220676
2014-10-27 11:28:53 +00:00
Viktor Kutuzov bff42de11c Allow thread sanitizer in clang driver on FreeBSD
Differential Revision: http://reviews.llvm.org/D5994

llvm-svn: 220675
2014-10-27 11:26:01 +00:00
Viktor Kutuzov adf81dbcc6 [Tsan] Fix references to renamed variables in DPrintf()
Differential Revision: http://reviews.llvm.org/D5993

llvm-svn: 220674
2014-10-27 11:22:24 +00:00
Viktor Kutuzov 9deb007191 [Tsan] Make calloc() to not track allocated space unless thread is completely initialized
Differential Revision: http://reviews.llvm.org/D5992

llvm-svn: 220673
2014-10-27 11:19:08 +00:00
Viktor Kutuzov a58fed9ab7 [Tsan] Fix guessing data range on FreeBSD
Differential Revision: http://reviews.llvm.org/D5990

llvm-svn: 220672
2014-10-27 11:14:24 +00:00
Oliver Stannard 79efe41a0c [ARM] Select VMAXNM and VMINNM regardless of operand order
Currently, the ARM backend will select the VMAXNM and VMINNM for these C
expressions:
  (a < b) ? a : b
  (a > b) ? a : b
but not these expressions:
  (a > b) ? b : a
  (a < b) ? b : a

This patch allows all of these expressions to be matched.

llvm-svn: 220671
2014-10-27 09:23:02 +00:00
Yuri Gorshenin 3e22bb8c54 [asan-asm-instrumentation] Added comment describing how asm instrumentation works.
Summary: [asan-asm-instrumentation] Added comment describing how asm instrumentation works.

Reviewers: eugenis

Subscribers: llvm-commits

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

llvm-svn: 220670
2014-10-27 08:38:54 +00:00
Rui Ueyama 292fb6d7be Re-commit r220667.
C++ source given to check_cxx_source_compile should have define "main".

llvm-svn: 220669
2014-10-27 08:16:18 +00:00
NAKAMURA Takumi 59c74b225a Fix unicode chars into ascii in comment lines.
llvm-svn: 220668
2014-10-27 08:08:18 +00:00
Rui Ueyama 7ef5796b20 Revert "Include stddef.h before including cxxabi.h" to un-break buildbot
This reverts commit r220665.

llvm-svn: 220667
2014-10-27 08:03:21 +00:00
Rui Ueyama fccf7ef924 Remove #ifdef __FreeBSD
r220665 makes configure or CMake to set HAVE_CXXABI_H on FreeBSD 10.0.
We don't need this ugly ifdef condition anymore.

llvm-svn: 220666
2014-10-27 07:44:40 +00:00
Rui Ueyama 5f3212137d Include stddef.h before including cxxabi.h
On FreeBSD 10.0, size_t needs to be defined before including cxxabi.h.
Currenty HAVE_CXXABI_H is not defined on FreeBSD because of that reason.
This patch teaches cmake and configure how to include it.

http://reviews.llvm.org/D5940

llvm-svn: 220665
2014-10-27 07:37:57 +00:00
David Majnemer c8bdd23acf InstCombine: Fix a combine assuming that icmp operands were integers
An icmp may have pointer arguments, it isn't limited to integers or
vectors of integers.

This fixes PR21388.

llvm-svn: 220664
2014-10-27 05:47:49 +00:00
Alexey Samsonov e853b4f2e4 [Sanitizer] Return code that calculates hash for stacktrace back to StackDepot implementation
llvm-svn: 220663
2014-10-27 03:10:27 +00:00
Rafael Espindola 18c89411b8 LinkModules.cpp: don't repeat names in comments.
llvm-svn: 220662
2014-10-27 02:35:46 +00:00
Todd Fiala 479f230032 Fix the TestCreateAfterAttach test for llgs-local on ptracer lock-down.
llvm-svn: 220661
2014-10-27 00:58:27 +00:00
Todd Fiala 0135e236b6 Fix TestProcessAttach for Linux ptracer lock-down and llgs-local.
llvm-svn: 220660
2014-10-27 00:31:05 +00:00
Eric Christopher e7b87e5cc9 Fix 80-column and other odd formatting.
llvm-svn: 220659
2014-10-26 23:40:33 +00:00
David Blaikie df1cca3a24 Remove some unnecessary casts.
llvm-svn: 220658
2014-10-26 23:37:04 +00:00
Benjamin Kramer a885796d5f Make VFS and FileManager match the current MemoryBuffer API.
This eliminates converting back and forth between the 3 formats and
gives us a more homogeneous interface.

llvm-svn: 220657
2014-10-26 22:44:13 +00:00
Todd Fiala 789d29df34 Fix up TestRegisters for Linux ptracer lock-down.
All of these test fixups are prep work for when llgs is
running with llgs for local process debugging, where these
tests fail without the ptracer lock-down suppression.

llvm-svn: 220656
2014-10-26 22:25:33 +00:00
Lang Hames 5af35a9ee1 [PBQP] Tidying up as per Dave Blaikie's suggesions for r220642.
llvm-svn: 220655
2014-10-26 22:12:02 +00:00
Todd Fiala 25a0ad9707 Fix TestAttachResume test so it doesn't hang on Linux with ptrace lockdown.
Similar to previous fix, this augments the test inferior to
immediately indicate it may be ptraced by any Linux process
when the appropriate symbols are defined.

This seems to indicate we need to fix our lldb attach logic to
catch when an attach fails, and trigger an appropriate error
instead of the current behavior of hanging indefinitely.

llvm-svn: 220654
2014-10-26 22:08:56 +00:00
Lang Hames 6bac95a33b [PBQP] Explicitly define copy/move operations for NodeMetadata to keep VS happy.
Hopefully this fixes the bug that was introduced in r220642, and not-quite-fixed
in r220649.

llvm-svn: 220653
2014-10-26 21:55:54 +00:00
Arnold Schwaighofer eb1a38fa73 Add an option to the LTO code generator to disable vectorization during LTO
We used to always vectorize (slp and loop vectorize) in the LTO pass pipeline.

r220345 changed it so that we used the PassManager's fields 'LoopVectorize' and
'SLPVectorize' out of the desire to be able to disable vectorization using the
cl::opt flags 'vectorize-loops'/'slp-vectorize' which the before mentioned
fields default to.
Unfortunately, this turns off vectorization because those fields
default to false.
This commit adds flags to the LTO library to disable lto vectorization which
reconciles the desire to optionally disable vectorization during LTO and
the desired behavior of defaulting to enabled vectorization.

We really want tools to set PassManager flags directly to enable/disable
vectorization and not go the route via cl::opt flags *in*
PassManagerBuilder.cpp.

llvm-svn: 220652
2014-10-26 21:50:58 +00:00
Hafiz Abid Qadeer 01db53848e Added a missing call to 'Reset'.
HostThreadWindows::Join() did not call the Reset as is done by
the HostThreadPosix::Join(). As a result, future call to 
IsJoinable() can fail.

Committed as obvious.
 

llvm-svn: 220651
2014-10-26 21:38:43 +00:00
Todd Fiala f183754779 Fix HelloWorld attach test for Linux kernels with ptrace ancestor lockdown.
Similar to a recent test I fixed for gdb-remote attach scenarios, this
fix is for Linux kernels, such as Ubuntu's stock setup on 11.04-ish and
later, where ptrace starts requiring a ptracer to be an ancestor of the
inferior to be ptraced.  This change checks for Linux and the ptrace-related
flags.  If they're found, it tries to switch on the "allow any ptracer" mode
for the inferior as the first statements in the program.  It's a best-effort
solution - if the prctl call fails, the failure is ignored, and probably will
lead to the test failing.

The ptrace security behavior can be modified system-wide, but is outside the
scope of the test to address.  Hence I went with this particular solution.

llvm-svn: 220650
2014-10-26 21:37:46 +00:00
Lang Hames 37ea9315e6 [PBQP] Re-commit r220642 with a workaround for quirky Visual Studio behavior.
Apparently unique_ptr'ifying NodeMetadata exposed an issue in VS where it
occasionally tries to synthesize copy constructors instead of moves. Hopefully
explicitly deleting the copy constructor and defining the move constructor will
fix this.

llvm-svn: 220649
2014-10-26 20:57:16 +00:00
Peter Zotov 2ab0d305a4 [OCaml] Expose existing documentation in ocamldoc.
Patch by Gabriel Radanne <drupyog@zoho.com>.

llvm-svn: 220648
2014-10-26 20:45:22 +00:00
Marshall Clow aedfb87089 Change the comment on the closing #endif to match the condition on the corresponding #ifdef. Thanks to K-ballo for the catch. No functionality change.
llvm-svn: 220647
2014-10-26 20:29:38 +00:00
Hans Wennborg d7580835cb ModuleMap.cpp: fix Windows build, take 2
llvm-svn: 220646
2014-10-26 20:00:53 +00:00
Hans Wennborg deb10060ab Revert "[PBQP] Unique-ptrify some PBQP Metadata structures. No functional change." (r220642)
It broke the Windows build:

  [1/19] Building CXX object lib\CodeGen\CMakeFiles\LLVMCodeGen.dir\RegAllocPBQP.cpp.obj
  C:\bb-win7\ninja-clang-i686-msc17-R\llvm-project\llvm\include\llvm/CodeGen/RegAllocPBQP.h(132) : error C2248: 'std::unique_ptr<_Ty>::unique_ptr' : cannot access private member declared in class 'std::unique_ptr<_Ty>'

     with
     [
         _Ty=unsigned int []
     ]
     D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\memory(1600) : see declaration of 'std::unique_ptr<_Ty>::unique_ptr'
     with
     [
         _Ty=unsigned int []
     ]
     This diagnostic occurred in the compiler generated function 'llvm::PBQP::RegAlloc::NodeMetadata::NodeMetadata(const llvm::PBQP::RegAlloc::NodeMetadata &)'

llvm-svn: 220645
2014-10-26 19:50:13 +00:00
Hans Wennborg 0ef0aeca4f ModuleMap.cpp: fix VS2012 build
llvm-svn: 220644
2014-10-26 19:39:46 +00:00
Hans Wennborg f89a3f8623 Try to fix the Windows build after r220637
llvm-svn: 220643
2014-10-26 19:27:02 +00:00
Lang Hames 2e3e3d94c8 [PBQP] Unique-ptrify some PBQP Metadata structures. No functional change.
llvm-svn: 220642
2014-10-26 18:50:52 +00:00
Lang Hames 99405777bc [PBQP] Tidy up CostAllocator.h: fix variable case, rename CostPool to ValuePool.
No functional change. This just brings things more in-line with coding
standards, and makes ValuePool's functionality clearer (it's not tied to pooling
costs, and we may want to use it to hold other things in the future).

llvm-svn: 220641
2014-10-26 18:16:27 +00:00
Daniel Jasper 09c7c93937 Delete unused method and clangAST dependency it required.
llvm-svn: 220640
2014-10-26 14:26:55 +00:00
NAKAMURA Takumi 0e98d93824 ModuleMap::addHeader(): Appease msc17.
llvm-svn: 220639
2014-10-26 13:12:35 +00:00
Elena Demikhovsky 4b01b7306c AVX-512: Fixed encoding of VPBROADCASTM and added SKX forms of this instruction
llvm-svn: 220638
2014-10-26 09:52:24 +00:00
Alexey Samsonov 3741ab82ba Change StackDepot interface to use StackTrace more extensively
llvm-svn: 220637
2014-10-26 06:23:07 +00:00