Commit Graph

141012 Commits

Author SHA1 Message Date
Dmitry Vyukov
9de857a0be asan: enable allocator version 1 by default
llvm-svn: 172392
2013-01-14 09:03:24 +00:00
Richard Smith
b5b5320bff Add extra tests for [[gnu::...]] attributes, missed from r172382.
llvm-svn: 172391
2013-01-14 08:57:42 +00:00
Dmitry Vyukov
38092f628b asan/tsan: fix memory allocator statistics
llvm-svn: 172390
2013-01-14 08:51:08 +00:00
Dmitry Vyukov
064c739cea asan: fix Android build
llvm-svn: 172389
2013-01-14 08:48:26 +00:00
Dmitry Vyukov
795eb90db5 asan/tsan: faster memory allocator
1. Increase size classes from 32k to 128k
2. Use lock-free stack in central cache
3. Use blocking mutex when allocate new memory with mmap

llvm-svn: 172388
2013-01-14 08:23:34 +00:00
Dmitry Vyukov
8d15db4a1e tsan: fix cmake warning (unused private field)
llvm-svn: 172387
2013-01-14 08:21:34 +00:00
Dmitry Vyukov
316faf78ee tsan: add the FIXME
llvm-svn: 172386
2013-01-14 08:12:47 +00:00
Dmitry Vyukov
af4b0b084a asan: fix compilation errors in mutex
llvm-svn: 172385
2013-01-14 08:01:58 +00:00
Richard Smith
59b8e701d3 Fix regression in r172376. Don't try to detect missing 'constexpr' specifiers
on redeclarations, since that makes us pick wrong prior declarations under
some circumstances.

llvm-svn: 172384
2013-01-14 08:00:39 +00:00
Kostya Serebryany
f55e719a13 [asan] add more frames to standalone_malloc_test
llvm-svn: 172383
2013-01-14 07:59:09 +00:00
Richard Smith
368ca52cd9 Accept [[gnu::*]] for all __attribute__((*))s which are:
1) Supported by Clang, and
 2) Supported by GCC, and
 3) Documented in GCC's manual.

g++ allows its C++11-style attributes to appertain only to the entity being
declared, and never to a type (even for a type attribute), so we do the same.

llvm-svn: 172382
2013-01-14 07:53:01 +00:00
Dmitry Vyukov
3d462f89de asan: add missing file
llvm-svn: 172381
2013-01-14 07:52:01 +00:00
Dmitry Vyukov
f22982bf0a asan/tsan: move blocking mutex from asan to sanitizer_common
llvm-svn: 172380
2013-01-14 07:51:39 +00:00
Craig Topper
0d2c29e807 Simplify nested strconcats in X86 td files since strconcat can take more than 2 arguments.
llvm-svn: 172379
2013-01-14 07:46:34 +00:00
Craig Topper
4c69a05d2d Create a single multiclass for SSE and AVX version of MOVL/MOVH. Prevents needing to specify everything twice. No functional change intended
llvm-svn: 172378
2013-01-14 07:26:58 +00:00
Nico Weber
7769a9044e Formatter: Add a test for bitfields.
They work fine, but this fifth use of colons (after labels, in ?:,
in initalizer lists in constructors, in objc method expressions, and in
bitfields) wasn't covered by tests yet.

llvm-svn: 172377
2013-01-14 05:49:49 +00:00
Richard Smith
574f4f6a1d PR12008: defer adding the implicit 'const' to a constexpr member function until
we know whether it is static.

llvm-svn: 172376
2013-01-14 05:37:29 +00:00
Richard Smith
01141a95a5 *this is const in a trailing-return-type for a constexpr member function.
llvm-svn: 172375
2013-01-14 01:55:13 +00:00
Michael Gottesman
4385edf5cb Fixed some 80+ violations.
llvm-svn: 172374
2013-01-14 01:47:53 +00:00
Dmitri Gribenko
9c256e379e libclang: remove a few const_casts
llvm-svn: 172373
2013-01-14 00:46:27 +00:00
Dmitri Gribenko
049a4ffcb8 Constify argument of Preprocessor::getMacroInfoHistory and propagate to
callers, removing unneeded const_cast

llvm-svn: 172372
2013-01-14 00:36:42 +00:00
Michael Gottesman
97e3df087d Updated the documentation in ObjCARC.cpp to fit the style guide better (i.e. use doxygen). Still some work to do though.
llvm-svn: 172371
2013-01-14 00:35:14 +00:00
Dmitri Gribenko
aaf7f2978c Remove an unneeded const_cast
llvm-svn: 172370
2013-01-14 00:25:25 +00:00
Michael Gottesman
c99ee6b336 Added bugzilla PR number to test case.
llvm-svn: 172369
2013-01-13 22:17:22 +00:00
Michael Gottesman
f15c0bb495 Fixed an infinite loop in the block escape in analysis in ObjCARC caused by 2x blocks each assigned a value via a phi-node causing each to depend on the other.
A test case is provided as well.

llvm-svn: 172368
2013-01-13 22:12:06 +00:00
Dmitri Gribenko
765396f2f0 ArrayRef'ize Sema APIs related to format string checking
llvm-svn: 172367
2013-01-13 20:46:02 +00:00
Tim Northover
754d1e4932 Implement __aeabi_lcmp and ulcmp
Patch contributed by Andrew Turner.

llvm-svn: 172366
2013-01-13 19:18:02 +00:00
Tim Northover
0d8c9ca7e6 Correct name of __aeabi_f2lz.
Patch contributed by Andrew Turner.

llvm-svn: 172365
2013-01-13 19:18:00 +00:00
Nick Lewycky
f41a80efd0 Fix typo in comment.
llvm-svn: 172364
2013-01-13 19:03:55 +00:00
Nuno Lopes
f4ddc9c002 fix compile-time regression report by Joerg Sonnenberger:
cache result of Size/OffsetVisitor to speedup analysis of PHI nodes

llvm-svn: 172363
2013-01-13 18:02:57 +00:00
Dmitri Gribenko
dc81f51d37 Document behavior of -Wformat-nonliteral, it is different from GCC
llvm-svn: 172362
2013-01-13 16:37:18 +00:00
Daniel Jasper
942ee72aff Stronger respect the input codes line breaks wrt. comments.
clang-format should not change whether or not there is a line break
before a line comment as this strongly influences the percieved binding.

User input: void f(int a,
                   // b is awesome
		   int b);
            void g(int a, // a is awesome
		   int b);
Before:     void f(int a, // b is awesome
                   int b);
            void g(int a, // a is awesome
		   int b);
After:      <unchanged from input>

llvm-svn: 172361
2013-01-13 16:10:20 +00:00
Dmitri Gribenko
bb13a3c457 Documentation: use monospaced font for intrinsics' names
llvm-svn: 172360
2013-01-13 16:07:49 +00:00
Dmitri Gribenko
c5137404f4 Fix broken link to LangRef
llvm-svn: 172359
2013-01-13 16:06:11 +00:00
Dmitri Gribenko
226fea5bd6 Remove redundant 'llvm::' qualifications
llvm-svn: 172358
2013-01-13 16:01:15 +00:00
Michael J. Spencer
7d1b7c4c38 Fix LLP64 build.
llvm-svn: 172357
2013-01-13 16:00:51 +00:00
Dmitri Gribenko
462462e98d Update links to "Itanium C++ ABI: Exception Handling" document
llvm-svn: 172356
2013-01-13 15:53:09 +00:00
Daniel Jasper
22cf462234 Format unions like structs and classes.
Note that I don't know whether we should put {} on a single line in this
case, but it is probably a theoretical issue as in practice such
structs, classes or unions won't be empty.

Before: union A {}
        a;
After:  union A {} a;
llvm-svn: 172355
2013-01-13 14:39:04 +00:00
Chandler Carruth
953fb087e5 Refactor the x86 CPU name logic in the driver and pass -march and -mcpu
flag information down from the Clang driver into the Gold linker plugin
for LTO. This allows specifying -march on the linker commandline and
should hopefully have it pass all the way through to the LTO optimizer.

Fixes PR14697.

llvm-svn: 172354
2013-01-13 11:46:33 +00:00
Benjamin Kramer
bcd14a0f26 X86: Add patterns for X86ISD::VSEXT in registers.
Those can occur when something between the sextload and the store is on the same
chain and blocks isel. Fixes PR14887.

llvm-svn: 172353
2013-01-13 11:37:04 +00:00
NAKAMURA Takumi
7ab4fbf5c2 CGBuiltin.cpp: Fix abuse of ArrayRef in EmitOverflowIntrinsic().
In ArrayRef<T>(X), X should not be temporary value. It could be rewritten more redundantly;

  llvm::Type *XTy = X->getType();
  ArrayRef<llvm::Type *> Ty(XTy);
  llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, Ty);

Since it is safe if both XTy and Ty are temporary value in one statement, it could be shorten;

  llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, ArrayRef<llvm::Type*>(X->getType()));

ArrayRef<T> has an implicit constructor to create uni-entry of T;

  llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, X->getType());

MSVC-generated clang.exe crashed.

llvm-svn: 172352
2013-01-13 11:26:44 +00:00
Daniel Jasper
48cb3b97c7 Always put a space after ",".
I am not aware of a case where that would be wrong. The specific case I
am fixing are function parameters wrapped in parenthesis (e.g. in
macros).

Before: function(a,(b));
After:  function(a, (b));
llvm-svn: 172351
2013-01-13 08:19:51 +00:00
Daniel Jasper
5ef433fc0c Don't put spaces around hyphens in include paths.
Before: #include <a - a>
After:  #include <a-a>
llvm-svn: 172350
2013-01-13 08:12:18 +00:00
Daniel Jasper
ef906a9c67 Improve identification of c-style casts.
A ")" before any of "=", "{" or ";" won't be a cast. This fixes issues
with the formatting of unnamed parameters.

Before: void f(int *){}
After:  void f(int *) {}
llvm-svn: 172349
2013-01-13 08:01:36 +00:00
Nadav Rotem
40e45eeae2 Fix PR14547. Handle induction variables of small sizes smaller than i32 (i8 and i16).
llvm-svn: 172348
2013-01-13 07:56:29 +00:00
Michael Gottesman
1a89fe554b [ObjCARC] Even more debug messages!
llvm-svn: 172347
2013-01-13 07:47:32 +00:00
Michael Gottesman
af2113ffb5 [ObjCARC] More debug messages.
llvm-svn: 172346
2013-01-13 07:00:51 +00:00
Michael Gottesman
c5cc9f154d Updated documentation to reflect new multiprecision builtin functions.
llvm-svn: 172345
2013-01-13 04:35:31 +00:00
NAKAMURA Takumi
4b7d1ce9c1 clang/test/CodeGen/builtins-multiprecision.c: Enhance for each test to run on theree targets, i686, amd64, win64.
llvm-svn: 172344
2013-01-13 03:55:21 +00:00
Michael Gottesman
987226696e Fixed spelling of test name: builtins-multipercision.c => builtins-multiprecision.c.
llvm-svn: 172343
2013-01-13 03:44:31 +00:00