Commit Graph

147393 Commits

Author SHA1 Message Date
Daniel Jasper 6728fc11bc Change clang-format's affinity for breaking after return types.
Function declarations are now broken with the following preferences:
1) break amongst arguments.
2) break after return type.
3) break after (.
4) break before after nested name specifiers.

Options #2 or #3 are preferred over #1 only if a substantial number of
lines can be saved by that.

llvm-svn: 179287
2013-04-11 14:29:13 +00:00
Kostya Serebryany 18f0820552 [asan] make heavy_uar_test a bit more heavy and fix he fake stack to pass this test
llvm-svn: 179286
2013-04-11 14:07:02 +00:00
Rafael Espindola cd848c0866 Add a function to check if an argument list is too long.
This will be used in clang to decide if it should create an @file or not. It
will be tested on the clang side.

Patch by Nathan Froyd.

llvm-svn: 179285
2013-04-11 14:06:34 +00:00
Reid Kleckner 9643a313ac Fix failing dependencies-and-pp.c test
The bots seem to do more line wrapping because they have longer absolute
paths.

llvm-svn: 179284
2013-04-11 13:43:19 +00:00
Reid Kleckner 0675f85ef2 Use lit's internal shell runner on Windows for Clang tests
The behavior can be overridden by setting LIT_USE_INTERNAL_SHELL=0 in
the environment.

This fixes issues with /dev/null for me and brings the test suite time
down to 30s.  =D

llvm-svn: 179283
2013-04-11 13:34:18 +00:00
Reid Kleckner 37e8fe13e0 FileCheck-ify more grep tests with quoted double quotes
This required some tedious reordering to match clang's order.
Presumably these ObjC tests were generated based on llvm-gcc's output
ordering.

llvm-svn: 179282
2013-04-11 13:24:56 +00:00
Alexey Samsonov a672ba6e8f [ASan] test source-based init-order blacklisting added in r179280
llvm-svn: 179281
2013-04-11 13:21:41 +00:00
Alexey Samsonov a28f36c2e2 [ASan] Allow disabling init-order checks for globals by source file name.
llvm-svn: 179280
2013-04-11 13:20:00 +00:00
Sylvestre Ledru b5739daf2d Add myself in the CREDITS.TXT
llvm-svn: 179279
2013-04-11 13:15:39 +00:00
Kostya Serebryany 3fec2f534a [asan] fix use-after-return functionality (PR15672) and enable the corresponding test. We still don't guarantee anything with regard to use-after-return checking
llvm-svn: 179278
2013-04-11 12:49:38 +00:00
Benjamin Kramer b50682e156 Add missing colons to check lines.
llvm-svn: 179277
2013-04-11 12:41:41 +00:00
Benjamin Kramer 3960c1cd56 FileCheckize a bunch of tests.
llvm-svn: 179276
2013-04-11 12:32:23 +00:00
Benjamin Kramer e7c45bc670 Add braces around || in && to pacify GCC.
llvm-svn: 179275
2013-04-11 11:57:01 +00:00
Alexey Samsonov 46cc45a291 [ASan] Symbolize correct address when printint error summary
llvm-svn: 179274
2013-04-11 11:45:04 +00:00
Kostya Serebryany 4e0a33c8be [asan] move fake stack into a separate .h file; actually disable a failing test
llvm-svn: 179273
2013-04-11 11:39:19 +00:00
Benjamin Kramer c86fdf12e8 Rename the C function to create a SLPVectorizerPass to something sane and expose it in the header file.
llvm-svn: 179272
2013-04-11 11:36:36 +00:00
Kostya Serebryany fd7f924016 [asan] add heavy_uar_test (disabled); fix lint
llvm-svn: 179271
2013-04-11 11:29:07 +00:00
Daniel Jasper 6e8f4edf2d Fix formatting of overloaded assignment operators.
Before: SomeType &operator=(const SomeType & S);
After:  SomeType &operator=(const SomeType &S);
llvm-svn: 179270
2013-04-11 08:48:20 +00:00
Ryan Govostes 8c4c126653 [analyzer] Factor common code from {SymSym,SymInt,IntSym}Expr to BinarySymExpr
llvm-svn: 179269
2013-04-11 06:04:50 +00:00
Tobias Grosser 249c4b1ad5 ScheduleOptimizer: Use isl_map_from_union_map to extract map.
llvm-svn: 179268
2013-04-11 05:55:13 +00:00
Michael Liao 55658d4222 Optimize vector select from all 0s or all 1s
As packed comparisons in AVX/SSE produce all 0s or all 1s in each SIMD lane,
vector select could be simplified to AND/OR or removed if one or both values
being selected is all 0s or all 1s.

llvm-svn: 179267
2013-04-11 05:15:54 +00:00
Michael Liao 95d9440348 Add CLAC/STAC instruction encoding/decoding support
As these two instructions in AVX extension are privileged instructions for
special purpose, it's only expected to be used in inlined assembly.

llvm-svn: 179266
2013-04-11 04:52:28 +00:00
Michael Liao f7bf87051a Enhance bool simplifcation in X86 to handle more cases
This patch is revised based on patch from Victor Umansky
<victor.umansky@intel.com>. More cases are handled in X86's bool
simplification, i.e.
- SETCC_CARRY
- value is truncated to i1 with AND

As a by-product, PR5443 is also fixed.

llvm-svn: 179265
2013-04-11 04:43:09 +00:00
Shankar Easwaran bba9fe8495 [test] missing underscore while checking for test output
llvm-svn: 179264
2013-04-11 04:20:21 +00:00
NAKAMURA Takumi 3ee2b1e26f R600ControlFlowFinalizer.cpp: Fix a warning. [-Wunused-variable]
llvm-svn: 179263
2013-04-11 04:16:27 +00:00
NAKAMURA Takumi 3b0853be56 Whitespace.
llvm-svn: 179262
2013-04-11 04:16:22 +00:00
NAKAMURA Takumi 2cc16a18cc ARCMigrate/Transforms.h: Remove \arg in comment. [-Wdocumentation]
llvm-svn: 179261
2013-04-11 04:16:11 +00:00
Shankar Easwaran 4cb24b38f6 [test] fix failing test, the test was not accounting for - in the path
llvm-svn: 179260
2013-04-11 04:08:11 +00:00
Rafael Espindola 93f4a62a25 Simplify the code. No functionality change.
llvm-svn: 179259
2013-04-11 03:34:37 +00:00
Jason Molenda 801237a221 Change the disassemble option to specify the architecture from '-a'
to '-A'.

Add option '-a' / '--address' to disassemble which will find the
function that contains that address, and disassemble the entire function.

<rdar://problem/13436207> 

llvm-svn: 179258
2013-04-11 03:14:01 +00:00
Shankar Easwaran eeee23e60a This adds functionality for undefined atoms from dynamic libraries to be added
to the list of undefined atoms. 

The processing of undefined atoms from dynamic libraries is controlled by
use-shlib-undefines command line option. 

This patch also adds additional command line arguments to allow/disallow
unresolved symbols from shared libraries and mimics GNU ld behavior.

llvm-svn: 179257
2013-04-11 02:56:30 +00:00
Rafael Espindola 1d532a3083 Add MachO-x86-64 tests.
The object was already checked in, but was not being tested.

llvm-svn: 179256
2013-04-11 02:52:29 +00:00
Rafael Espindola e410099a02 Fix MachO's getRelocationAdditionalInfo.
It was returning the loaded address of the section containing the relocation,
which really doesn't seem to be the intent of this function.

llvm-svn: 179255
2013-04-11 02:21:31 +00:00
John McCall bc48989d0d Drop ObjCIndirectCopyRestoreExprs during template instantiation.
It's a kind of implicit conversion, which we generally drop, but
more importantly it's got very specific placement requirements.

rdar://13617051

llvm-svn: 179254
2013-04-11 02:14:26 +00:00
Sean Callanan df66765d35 Changed the way ClangExpressionDeclMap registers
entities with the new Materializer so that it only
registers those entities that actually need to be
placed in the struct.

llvm-svn: 179253
2013-04-11 02:05:11 +00:00
Hal Finkel f29285a487 Make PPCInstrInfo::isPredicated always return false
Because of how predication in implemented on PPC (only for branches), I think
that this is the right thing to do.  No functionality change intended.

llvm-svn: 179252
2013-04-11 01:23:34 +00:00
Argyrios Kyrtzidis e822f58db4 [libclang] Expose record layout info via new libclang functions:
clang_Type_getAlignOf
clang_Type_getSizeOf
clang_Type_getOffsetOf
clang_Cursor_isBitField

Patch by Loïc Jaquemet!

llvm-svn: 179251
2013-04-11 01:20:11 +00:00
Jordan Rose b1312a5495 Force a load when creating a reference to a temporary copied from a bitfield.
For this source:
  const int &ref = someStruct.bitfield;

We used to generate this AST:

  DeclStmt [...]
  `-VarDecl [...] ref 'const int &'
    `-MaterializeTemporaryExpr [...] 'const int' lvalue
      `-ImplicitCastExpr [...] 'const int' lvalue <NoOp>
        `-MemberExpr [...] 'int' lvalue bitfield .bitfield [...]
          `-DeclRefExpr [...] 'struct X' lvalue ParmVar [...] 'someStruct' 'struct X'

Notice the lvalue inside the MaterializeTemporaryExpr, which is very
confusing (and caused an assertion to fire in the analyzer - PR15694).

We now generate this:

  DeclStmt [...]
  `-VarDecl [...] ref 'const int &'
    `-MaterializeTemporaryExpr [...] 'const int' lvalue
      `-ImplicitCastExpr [...] 'int' <LValueToRValue>
        `-MemberExpr [...] 'int' lvalue bitfield .bitfield [...]
          `-DeclRefExpr [...] 'struct X' lvalue ParmVar [...] 'someStruct' 'struct X'

Which makes a lot more sense. This allows us to remove code in both
CodeGen and AST that hacked around this special case.

The commit also makes Clang accept this (legal) C++11 code:

  int &&ref = std::move(someStruct).bitfield

PR15694 / <rdar://problem/13600396>

llvm-svn: 179250
2013-04-11 00:58:58 +00:00
Daniel Dunbar 9448e8594f lit: Don't descend into .git directories during test discovery.
llvm-svn: 179249
2013-04-11 00:31:35 +00:00
Daniel Dunbar 2e4a49ae25 lit: Shorten a metavar to make --help look nicer.
llvm-svn: 179248
2013-04-11 00:31:27 +00:00
Daniel Dunbar 970faff8c1 lit: Add a test for discovery when exact test names are given.
llvm-svn: 179247
2013-04-11 00:31:22 +00:00
Enrico Granata c1c31b2c98 Updated the line on which to break for the formatters test
Moving over to source-regex might be a good idea, but it’s not what we really want to test. Ideally, we would set a regex breakpoint to find the right line, then delete it and set one by file and line with the right line info from before.

llvm-svn: 179246
2013-04-11 00:28:12 +00:00
Sean Callanan 96d2730a7b Added a Materializer class that contains
information about each variable that needs to
be materialized for an expression to work.  The
next step is to migrate all materialization code
from ClangExpressionDeclMap to Materializer, and
to use it for variable materialization.

llvm-svn: 179245
2013-04-11 00:09:05 +00:00
Nico Rieck 5143243484 Add man page for llvm-readobj
llvm-svn: 179244
2013-04-11 00:05:57 +00:00
Daniel Dunbar 99a67ed76e lit: Add a trivial test of the basic progress bar.
llvm-svn: 179243
2013-04-11 00:05:37 +00:00
Anton Yartsev 1e2bc9b53b [analyzer] Refactoring: better doxygen comment; renaming isTrackedFamily to isTrackedByCurrentChecker
llvm-svn: 179242
2013-04-11 00:05:20 +00:00
Eli Bendersky 1dceb3c9a2 Rewrite some of the test/CodeGen/X86 tests to use FileCheck instead of grep
llvm-svn: 179241
2013-04-10 23:30:20 +00:00
Nico Rieck 1da4529b15 MC: Support COFF image-relative MCSymbolRefs
Add support for the COFF relocation types IMAGE_REL_I386_DIR32NB and
IMAGE_REL_AMD64_ADDR32NB for 32- and 64-bit respectively. These are
similar to normal 4-byte relocations except that they do not include
the base address of the image.

Image-relative relocations are used for debug information (32-bit) and
SEH unwind tables (64-bit).

A new MCSymbolRef variant called 'VK_COFF_IMGREL32' is introduced to
specify such relocations. For AT&T assembly, this variant can be accessed
using the symbol suffix '@imgrel'.

llvm-svn: 179240
2013-04-10 23:28:17 +00:00
Joey Gouly 51f6fb9a18 Delete the functions F1 and F2 to appease the valgrind bot.
llvm-svn: 179239
2013-04-10 23:21:26 +00:00
Fariborz Jahanian ccd66d259a comment parsing. Add couple more needed doxygen tags.
// rdar://12379053

llvm-svn: 179238
2013-04-10 23:10:42 +00:00