platform/upstream/llvm.git
11 years agoAdding a Makefile. Hopefully that will make the Linux buildbot happy
Enrico Granata [Tue, 29 Jan 2013 00:29:33 +0000 (00:29 +0000)]
Adding a Makefile. Hopefully that will make the Linux buildbot happy

llvm-svn: 173732

11 years agoFixed a "wchar_t" typo.
Greg Clayton [Tue, 29 Jan 2013 00:29:18 +0000 (00:29 +0000)]
Fixed a "wchar_t" typo.

llvm-svn: 173731

11 years agoUnroll again after running BBVectorize
Hal Finkel [Tue, 29 Jan 2013 00:22:49 +0000 (00:22 +0000)]
Unroll again after running BBVectorize

Because BBVectorize may significantly shorten a loop body, unroll
again after vectorization. This is especially important when using
runtime or partial unrolling.

llvm-svn: 173730

11 years agoAdd isBGQ method to PPCSubtarget
Hal Finkel [Tue, 29 Jan 2013 00:22:47 +0000 (00:22 +0000)]
Add isBGQ method to PPCSubtarget

This function will be used in future commits.

llvm-svn: 173729

11 years ago<rdar://problem/12978143>
Enrico Granata [Mon, 28 Jan 2013 23:47:25 +0000 (23:47 +0000)]
<rdar://problem/12978143>

Data formatters now cache themselves.
This commit provides a new formatter cache mechanism. Upon resolving a formatter (summary or synthetic), LLDB remembers the resolution for later faster retrieval.
Also moved the data formatters subsystem from the core to its own group and folder for easier management, and done some code reorganization.
The ObjC runtime v1 now returns a class name if asked for the dynamic type of an object. This is required for formatters caching to work with the v1 runtime.
Lastly, this commit disposes of the old hack where ValueObjects had to remember whether they were queried for formatters with their static or dynamic type.
Now the ValueObjectDynamicValue class works well enough that we can use its dynamic value setting for the same purpose.

llvm-svn: 173728

11 years agoFinish semantic analysis for [[carries_dependency]] attribute.
Richard Smith [Mon, 28 Jan 2013 22:42:45 +0000 (22:42 +0000)]
Finish semantic analysis for [[carries_dependency]] attribute.

This required plumbing through a new flag to determine whether a ParmVarDecl is
actually a parameter of a function declaration (as opposed to a function
typedef etc, where the attribute is prohibited). Weirdly, this attribute (just
like [[noreturn]]) cannot be applied to a function type, just to a function
declaration (and its parameters).

llvm-svn: 173726

11 years agoTry to appease some broken compilers by using 'unsigned' instead of 'uint64_t'.
Bill Wendling [Mon, 28 Jan 2013 22:33:39 +0000 (22:33 +0000)]
Try to appease some broken compilers by using 'unsigned' instead of 'uint64_t'.

llvm-svn: 173725

11 years agoAlways define types from stdint.h so they are always available for use in expressions...
Greg Clayton [Mon, 28 Jan 2013 22:31:43 +0000 (22:31 +0000)]
Always define types from stdint.h so they are always available for use in expressions no matter what debug info you have. Types added are:

int8_t
uint8_t
int16_t
uint16_t
int32_t
uint32_t
int64_t
uint64_t
intptr_t
uintptr_t
size_t
ptrdiff_t
whar_t

llvm-svn: 173724

11 years agoAvoid Unnecessary Builds
David Greene [Mon, 28 Jan 2013 22:05:50 +0000 (22:05 +0000)]
Avoid Unnecessary Builds

By default, stop the universe build if a key component fails.  This
avoids useless builds when we know a package is broken anyway.
Provide a --keep-going option to override this behavior.

llvm-svn: 173723

11 years agoRemove the AttributeWithIndex class.
Bill Wendling [Mon, 28 Jan 2013 21:55:20 +0000 (21:55 +0000)]
Remove the AttributeWithIndex class.

The AttributeWithIndex class exposed the interior structure of the AttributeSet
class. That was gross. Remove it and all of the code that relied upon it.

llvm-svn: 173722

11 years agoAdd a comment mentioning that InstructionSimplify routines do,
Dan Gohman [Mon, 28 Jan 2013 21:45:32 +0000 (21:45 +0000)]
Add a comment mentioning that InstructionSimplify routines do,
in fact, resolve undef uses.

llvm-svn: 173721

11 years agoFileCheck'ize tests
Dmitri Gribenko [Mon, 28 Jan 2013 21:43:46 +0000 (21:43 +0000)]
FileCheck'ize tests

llvm-svn: 173720

11 years agodocs: reorganize front page slightly
Sean Silva [Mon, 28 Jan 2013 21:28:10 +0000 (21:28 +0000)]
docs: reorganize front page slightly

llvm-svn: 173718

11 years agoFileCheck'ize a test
Dmitri Gribenko [Mon, 28 Jan 2013 21:04:29 +0000 (21:04 +0000)]
FileCheck'ize a test

llvm-svn: 173717

11 years agoMigrate a test to -verify
Dmitri Gribenko [Mon, 28 Jan 2013 20:55:54 +0000 (20:55 +0000)]
Migrate a test to -verify

llvm-svn: 173716

11 years ago[driver] Revise this test to remove the dependency on the integrate assembler.
Chad Rosier [Mon, 28 Jan 2013 20:51:27 +0000 (20:51 +0000)]
[driver] Revise this test to remove the dependency on the integrate assembler.

llvm-svn: 173715

11 years agoFileCheck'ize and merge tests
Dmitri Gribenko [Mon, 28 Jan 2013 20:40:50 +0000 (20:40 +0000)]
FileCheck'ize and merge tests

llvm-svn: 173714

11 years agoUndo my re-wording of the "ARC forbids Objective-C objects in ..."
Douglas Gregor [Mon, 28 Jan 2013 20:13:44 +0000 (20:13 +0000)]
Undo my re-wording of the "ARC forbids Objective-C objects in ..."
error. Jordan is right.

llvm-svn: 173713

11 years agoAdd support for source and line information to IntelJITEventListener for object emitt...
Andrew Kaylor [Mon, 28 Jan 2013 19:52:37 +0000 (19:52 +0000)]
Add support for source and line information to IntelJITEventListener for object emitted by MCJIT.

llvm-svn: 173712

11 years agoFix gcc/printf/ISO C++ warning
Edwin Vane [Mon, 28 Jan 2013 19:34:42 +0000 (19:34 +0000)]
Fix gcc/printf/ISO C++ warning

Remove the use of the 't' length modifier to avoid a gcc warning. Based
on usage, 32 bits of precision is good enough for printing a stack
offset for a stack trace.

't' length modifier isn't in C++03 but it *is* in C++11. Added a FIXME
to reintroduce once LLVM makes the switch to C++11.

Reviewer: gribozavr
llvm-svn: 173711

11 years agoadd register section, remove contentType from sectionKey
Shankar Easwaran [Mon, 28 Jan 2013 19:21:04 +0000 (19:21 +0000)]
add register section, remove contentType from sectionKey

llvm-svn: 173709

11 years agoForbid the use of objects in unions in Objective-C++ ARC. Fixes
Douglas Gregor [Mon, 28 Jan 2013 19:08:09 +0000 (19:08 +0000)]
Forbid the use of objects in unions in Objective-C++ ARC. Fixes
<rdar://problem/13098104>.

llvm-svn: 173708

11 years agoEnable the global module index by default. Introduce the
Douglas Gregor [Mon, 28 Jan 2013 18:38:02 +0000 (18:38 +0000)]
Enable the global module index by default. Introduce the
-fno-modules-global-index -cc1 option to allow one to disable the
index for performance testing purposes, but with a 10% win in
-fsyntax-only time, there is no reason a user would do this.

llvm-svn: 173707

11 years agoThis patch addresses bug 15031.
Bill Schmidt [Mon, 28 Jan 2013 18:36:58 +0000 (18:36 +0000)]
This patch addresses bug 15031.

The common code in the post-RA scheduler to break anti-dependencies on the
critical path contained a flaw.  In the reported case, an anti-dependency
between the overlapping registers %X4 and %R4 exists:

%X29<def> = OR8 %X4, %X4
%R4<def>, %X3<def,dead,tied3> = LBZU 1, %X3<kill,tied1>

The unpatched code breaks the dependency by replacing %R4 and its uses
with %R3, the first register on the available list.  However, %R3 and
%X3 overlap, so this creates two overlapping definitions on the same
instruction.

The fix is straightforward, preventing selection of a register that
overlaps any other defined register on the same instruction.

The test case is reduced from the bug report, and verifies that we no
longer produce "lbzu 3, 1(3)" when breaking this anti-dependency.

llvm-svn: 173706

11 years agoASTReader and profiling statistics indicate that implementing a method
Douglas Gregor [Mon, 28 Jan 2013 18:29:39 +0000 (18:29 +0000)]
ASTReader and profiling statistics indicate that implementing a method
pool in the global module index is not worthwhile. Update comments to
limit the scope of the global module index to identifiers.

llvm-svn: 173705

11 years agoTests: remove disabled llvm-gcc invocations
Dmitri Gribenko [Mon, 28 Jan 2013 18:01:33 +0000 (18:01 +0000)]
Tests: remove disabled llvm-gcc invocations

llvm-svn: 173703

11 years agoAdd some more ASTReader statistics for global method pool lookups.
Douglas Gregor [Mon, 28 Jan 2013 17:54:36 +0000 (17:54 +0000)]
Add some more ASTReader statistics for global method pool lookups.

llvm-svn: 173702

11 years agoPR15067 (again): Don't warn about UCNs in C90 if we're raw-lexing.
Jordan Rose [Mon, 28 Jan 2013 17:49:02 +0000 (17:49 +0000)]
PR15067 (again): Don't warn about UCNs in C90 if we're raw-lexing.

Fixes a crash. Thanks, Richard.

llvm-svn: 173701

11 years agoFix comment.
Eric Christopher [Mon, 28 Jan 2013 17:39:03 +0000 (17:39 +0000)]
Fix comment.

llvm-svn: 173700

11 years agoFix comment.
Eric Christopher [Mon, 28 Jan 2013 17:33:26 +0000 (17:33 +0000)]
Fix comment.

llvm-svn: 173698

11 years agoFileCheck'ize and merge tests
Dmitri Gribenko [Mon, 28 Jan 2013 17:31:40 +0000 (17:31 +0000)]
FileCheck'ize and merge tests

llvm-svn: 173697

11 years agoFileCheck'ize test
Dmitri Gribenko [Mon, 28 Jan 2013 17:30:37 +0000 (17:30 +0000)]
FileCheck'ize test

llvm-svn: 173696

11 years agoFix a bug that would lead to bad line break decisions in for loops.
Daniel Jasper [Mon, 28 Jan 2013 17:30:17 +0000 (17:30 +0000)]
Fix a bug that would lead to bad line break decisions in for loops.

Before:
    for (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaa = aaaaaaaaaaaaaaa
             .aaaaaaaaaaaaaaaa;
         aaaaaaaaaaa != aaaaaaaaaaaaaaaaaaa; ++aaaaaaaaaaa) {}

After:
    for (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaa =
             aaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaa;
         aaaaaaaaaaa != aaaaaaaaaaaaaaaaaaa; ++aaaaaaaaaaa) {}

llvm-svn: 173695

11 years agoUse the correct order of NOINLINE vs ret type to fix Windows build
Timur Iskhodzhanov [Mon, 28 Jan 2013 17:29:50 +0000 (17:29 +0000)]
Use the correct order of NOINLINE vs ret type to fix Windows build

llvm-svn: 173694

11 years agoBack out r173689. It doesn't matter when we're building with Clang anyway.
Douglas Gregor [Mon, 28 Jan 2013 17:26:34 +0000 (17:26 +0000)]
Back out r173689. It doesn't matter when we're building with Clang anyway.

llvm-svn: 173693

11 years agoEliminate memory allocation from most invocations of
Douglas Gregor [Mon, 28 Jan 2013 16:46:33 +0000 (16:46 +0000)]
Eliminate memory allocation from most invocations of
ModuleManager::visit() by keeping a free list of the two data
structures used to store state (a preallocated stack and a visitation
number vector). Improves -fsyntax-only performance for my modules test
case by 2.8%. Modules has pulled ahead by almost 10% with the global
module index.

llvm-svn: 173692

11 years agoVectorization Factor clarification
Renato Golin [Mon, 28 Jan 2013 16:02:45 +0000 (16:02 +0000)]
Vectorization Factor clarification

llvm-svn: 173691

11 years agoDon't put a function's return type on its own line in Google style.
Daniel Jasper [Mon, 28 Jan 2013 15:40:20 +0000 (15:40 +0000)]
Don't put a function's return type on its own line in Google style.

This would be against the style guide:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Function_Declarations_and_Definitions#Function_Declarations_and_Definitions

Not sure what to do as a last resort if the function signature does not
fit onto a single line in Google style ..

llvm-svn: 173690

11 years agoNote that SrcMgr::SLocEntry's are POD-like, so SmallVector can do a
Douglas Gregor [Mon, 28 Jan 2013 15:39:10 +0000 (15:39 +0000)]
Note that SrcMgr::SLocEntry's are POD-like, so SmallVector can do a
better job with them. Shaves off 0.7% of -fparse-only time for a
modules test case. Sure makes you wonder...

llvm-svn: 173689

11 years agoLet clang-format break after a function's return type.
Daniel Jasper [Mon, 28 Jan 2013 15:16:31 +0000 (15:16 +0000)]
Let clang-format break after a function's return type.

Before:
TypeSpecDecl *TypeSpecDecl::Create(ASTContext &C, DeclContext *DC,
                                   SourceLocation L, IdentifierInfo *II,
                                   Type *T) {}

After:
TypeSpecDecl *
TypeSpecDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L,
                     IdentifierInfo *II, Type *T) {}

This fixes llvm.org/PR14717.

llvm-svn: 173688

11 years ago[msan] A runtime call to support custom allocators.
Evgeniy Stepanov [Mon, 28 Jan 2013 13:52:49 +0000 (13:52 +0000)]
[msan] A runtime call to support custom allocators.

llvm-svn: 173687

11 years ago[msan] Remove icmp tests that require exact shadow propagation.
Evgeniy Stepanov [Mon, 28 Jan 2013 13:45:16 +0000 (13:45 +0000)]
[msan] Remove icmp tests that require exact shadow propagation.

llvm-svn: 173686

11 years agoMake continuations in constructor initializers consistent.
Daniel Jasper [Mon, 28 Jan 2013 13:31:35 +0000 (13:31 +0000)]
Make continuations in constructor initializers consistent.

Before:
Constructor
    : LooooooooooooooooooooongVariable(
        LooooooooooooooooooooongValue) {}

After:
Constructor
    : LooooooooooooooooooooongVariable(
          LooooooooooooooooooooongValue) {}

llvm-svn: 173685

11 years agoInitial support for formatting range-based for-loops.
Daniel Jasper [Mon, 28 Jan 2013 13:21:16 +0000 (13:21 +0000)]
Initial support for formatting range-based for-loops.

Before (in good cases):
for (auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
     : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {}
for (auto aaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaa,
aaaa)) {}

After:
for (auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa :
     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {}
for (auto aaaaaaaaaaaaaaaaaaaa :
     aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaa, aaaa)) {}

llvm-svn: 173684

11 years agoImprove formatting of conditional expressions.
Daniel Jasper [Mon, 28 Jan 2013 12:45:14 +0000 (12:45 +0000)]
Improve formatting of conditional expressions.

Before we did not really systematically format those. Now, we format the
different cases as:

- 1 Line:  a ? b : c;
- 2 Lines: short ? loooooooooong
                 : loooooooooong
- 2 Lines: loooooooooooooooong
               ? short : short
- 3 Lines: loooooooooooooooong
               ? loooooooooooooong
               : loooooooooooooong

Not sure whether "?" and ":" should go on the new line, but it seems to
be the most consistent approach.

llvm-svn: 173683

11 years ago[msan] Mostly disable msan-handle-icmp-exact.
Evgeniy Stepanov [Mon, 28 Jan 2013 11:42:28 +0000 (11:42 +0000)]
[msan] Mostly disable msan-handle-icmp-exact.

It is way too slow. Change the default option value to 0.
Always do exact shadow propagation for unsigned ICmp with constants, it is
cheap (under 1% cpu time) and required for correctness.

llvm-svn: 173682

11 years ago[ASan] fix a bug in allocator-v2 which could lead to SEGV on realloc(malloc(0), 4)
Alexey Samsonov [Mon, 28 Jan 2013 11:24:13 +0000 (11:24 +0000)]
[ASan] fix a bug in allocator-v2 which could lead to SEGV on realloc(malloc(0), 4)

llvm-svn: 173681

11 years agoSeveral small changes in formatting decisions.
Daniel Jasper [Mon, 28 Jan 2013 09:35:24 +0000 (09:35 +0000)]
Several small changes in formatting decisions.

1. Use a hanging ident for function calls nested in binary expressions.
   E.g.:
   int aaaaa = aaaaaaaaa && aaaaaaaaaa(
                                aaaaaaaaaa);

2. Slightly improve heuristic for builder type expressions and reduce
   penalty for breaking before "." and "->" in those.

3. Remove  mostly obsolete metric of decreasing indent level. This
   fixes: llvm.org/PR14931.

Changes #1 and #2 were necessary to keep tests passing after #3.

llvm-svn: 173680

11 years agoRevert r173678.
Evgeniy Stepanov [Mon, 28 Jan 2013 09:18:40 +0000 (09:18 +0000)]
Revert r173678.

Broken tests.

llvm-svn: 173679

11 years ago[msan] Make msan-handle-icmp-exact=0 by default.
Evgeniy Stepanov [Mon, 28 Jan 2013 09:15:15 +0000 (09:15 +0000)]
[msan] Make msan-handle-icmp-exact=0 by default.

50% slowdown on one of the specs.

llvm-svn: 173678

11 years agoCMake: simplify build rules for compiler-rt unit tests. This fixes warnings in Ninja...
Alexey Samsonov [Mon, 28 Jan 2013 09:07:30 +0000 (09:07 +0000)]
CMake: simplify build rules for compiler-rt unit tests. This fixes warnings in Ninja build tree.

llvm-svn: 173677

11 years ago[asan] fix a crash in asan stats printing (initialize the allocator in __asan_init)
Kostya Serebryany [Mon, 28 Jan 2013 08:05:47 +0000 (08:05 +0000)]
[asan] fix a crash in asan stats printing (initialize the allocator in __asan_init)

llvm-svn: 173676

11 years agoImprove indentation after breaking at nested name specifiers.
Daniel Jasper [Mon, 28 Jan 2013 07:43:15 +0000 (07:43 +0000)]
Improve indentation after breaking at nested name specifiers.

These always represent a continuation and we should increase the ident.

Before:
aaaaaaaaa(aaaaaaaaaaaaaaaaaaaaa::
          aaaaaaaaaaaaaaaaaaaa);

After:
aaaaaaaaa(aaaaaaaaaaaaaaaaaaaaa::
              aaaaaaaaaaaaaaaaaaaa);

llvm-svn: 173675

11 years agoFix 256-bit PALIGNR comment decoding to understand that it works on independent 256...
Craig Topper [Mon, 28 Jan 2013 07:41:18 +0000 (07:41 +0000)]
Fix 256-bit PALIGNR comment decoding to understand that it works on independent 256-bit lanes.

llvm-svn: 173674

11 years agoAvoid confusing identations for multi-parameter functions.
Daniel Jasper [Mon, 28 Jan 2013 07:35:34 +0000 (07:35 +0000)]
Avoid confusing identations for multi-parameter functions.

Before:
aaaaaaaa(aaaaaaaaa(
    aaaaaaaaaa(),
         aaaaaaaaa);

After:
aaaaaaaa(aaaaaaaaa(
             aaaaaaaaaa(),
         aaaaaaaaa);

llvm-svn: 173673

11 years agoA bugfix for tblgen, in the function ‘emitSourceFileHeader’.
Nadav Rotem [Mon, 28 Jan 2013 07:35:33 +0000 (07:35 +0000)]
A bugfix for tblgen, in the function ‘emitSourceFileHeader’.
When the first parameter (‘Desc’) is more than 80 characters long, it will result the header line that contains the description to be more
Than (4GB!) long. Not only it takes forever to produce, the output file cannot be open, since its ginormous.

Patch by Elior Malul.

llvm-svn: 173672

11 years ago[asan] two more internal flags for asan-rt: print_stats (0) and print_legend (1)
Kostya Serebryany [Mon, 28 Jan 2013 07:34:22 +0000 (07:34 +0000)]
[asan] two more internal flags for asan-rt: print_stats (0) and print_legend (1)

llvm-svn: 173671

11 years agoPrint warning instead of error if optional ASan features are enabled w/o specifying...
Alexey Samsonov [Mon, 28 Jan 2013 07:20:44 +0000 (07:20 +0000)]
Print warning instead of error if optional ASan features are enabled w/o specifying -fsanitize=address

llvm-svn: 173670

11 years agoAdd missing break in 256-bit palignr comment printing. No test case yet because the...
Craig Topper [Mon, 28 Jan 2013 07:19:11 +0000 (07:19 +0000)]
Add missing break in 256-bit palignr comment printing. No test case yet because the comment itself is still wrong.

llvm-svn: 173669

11 years ago[CMake] Fix compiler-rt tests after r173617
Alexey Samsonov [Mon, 28 Jan 2013 07:16:22 +0000 (07:16 +0000)]
[CMake] Fix compiler-rt tests after r173617

llvm-svn: 173668

11 years agoFix inconsistent usage of PALIGN and PALIGNR when referring to the same instruction.
Craig Topper [Mon, 28 Jan 2013 06:48:25 +0000 (06:48 +0000)]
Fix inconsistent usage of PALIGN and PALIGNR when referring to the same instruction.

llvm-svn: 173667

11 years agoCreated ObjCARCUtil.cpp for functions which in my humble opinion are too large to...
Michael Gottesman [Mon, 28 Jan 2013 06:39:31 +0000 (06:39 +0000)]
Created ObjCARCUtil.cpp for functions which in my humble opinion are too large to static inline and place in a header file such as ObjCARC.h.

llvm-svn: 173666

11 years ago[ELF] Use correct regex in test.
Michael J. Spencer [Mon, 28 Jan 2013 06:11:39 +0000 (06:11 +0000)]
[ELF] Use correct regex in test.

llvm-svn: 173665

11 years agoRemove addToNoHelperNeeded function that was left unused after r173649. Fixes a ...
Craig Topper [Mon, 28 Jan 2013 06:09:24 +0000 (06:09 +0000)]
Remove addToNoHelperNeeded function that was left unused after r173649. Fixes a -Wunused warning.

llvm-svn: 173664

11 years agoCleaned up includes in various ObjCARC files and removed some whitespace violations.
Michael Gottesman [Mon, 28 Jan 2013 05:51:58 +0000 (05:51 +0000)]
Cleaned up includes in various ObjCARC files and removed some whitespace violations.

llvm-svn: 173663

11 years agoRefactor ObjCARCAliasAnalysis into its own file.
Michael Gottesman [Mon, 28 Jan 2013 05:51:54 +0000 (05:51 +0000)]
Refactor ObjCARCAliasAnalysis into its own file.

llvm-svn: 173662

11 years agoMid-air collision. reapply r173656.
Bill Wendling [Mon, 28 Jan 2013 05:51:40 +0000 (05:51 +0000)]
Mid-air collision. reapply r173656.

llvm-svn: 173661

11 years agoRewrite the removeAttr() method.
Bill Wendling [Mon, 28 Jan 2013 05:44:14 +0000 (05:44 +0000)]
Rewrite the removeAttr() method.

This now uses the AttributeSet object instead of the Attribute /
AttributeWithIndex objects. It's fairly simple now. It goes through all of the
subsets before the one we're modifying, adds them to the new set. It then adds
the modified subset (with the requested attributes removed). And then adds the
rest of the subsets.

llvm-svn: 173660

11 years agoRewrite the addAttr() method.
Bill Wendling [Mon, 28 Jan 2013 05:23:28 +0000 (05:23 +0000)]
Rewrite the addAttr() method.

This now uses the AttributeSet object instead of the Attribute /
AttributeWithIndex objects. It's fairly simple now. It goes through all of the
subsets before the one we're modifying, adds them to the new set. It then adds
the modified subset. And then adds the rest of the subsets.

llvm-svn: 173659

11 years agoFix a typo in the name of a tooling unit test
Hal Finkel [Mon, 28 Jan 2013 04:37:38 +0000 (04:37 +0000)]
Fix a typo in the name of a tooling unit test

llvm-svn: 173658

11 years agoFix the indentation of the first line of preprocessor output
Hal Finkel [Mon, 28 Jan 2013 04:37:37 +0000 (04:37 +0000)]
Fix the indentation of the first line of preprocessor output

The -E output from clang did not produce the correct indentation on the first line.
This is because MoveToLine returned false, and when this happens,
the regular process for producing initial indentation is skipped.

Thanks to Eli for suggesting a way to simplify this to a one-line change.

llvm-svn: 173657

11 years agoRevert r173646, "Use proper type for the index."
NAKAMURA Takumi [Mon, 28 Jan 2013 04:29:01 +0000 (04:29 +0000)]
Revert r173646, "Use proper type for the index."

Unfortunately, msvc miscompiles it. Investigating.

llvm-svn: 173656

11 years ago[ELF] Use entry point from LinkerOptions.
Michael J. Spencer [Mon, 28 Jan 2013 04:15:44 +0000 (04:15 +0000)]
[ELF] Use entry point from LinkerOptions.

Patch by Ahmed Bougacha!

llvm-svn: 173655

11 years agoRefactored out pass ObjCARCAPElim from ObjCARCOpts.cpp => ObjCARCAPElim.cpp.
Michael Gottesman [Mon, 28 Jan 2013 04:12:07 +0000 (04:12 +0000)]
Refactored out pass ObjCARCAPElim from ObjCARCOpts.cpp => ObjCARCAPElim.cpp.

llvm-svn: 173654

11 years agoFixed case insensitive issue.
Michael Gottesman [Mon, 28 Jan 2013 03:35:20 +0000 (03:35 +0000)]
Fixed case insensitive issue.

llvm-svn: 173653

11 years agoRemoved extraneous doxygen end module statement.
Michael Gottesman [Mon, 28 Jan 2013 03:30:34 +0000 (03:30 +0000)]
Removed extraneous doxygen end module statement.

llvm-svn: 173652

11 years agoExtracted pass ObjCARCExpand from ObjCARC.cpp => ObjCARCExpand.cpp.
Michael Gottesman [Mon, 28 Jan 2013 03:28:38 +0000 (03:28 +0000)]
Extracted pass ObjCARCExpand from ObjCARC.cpp => ObjCARCExpand.cpp.

I also added the local header ObjCARC.h for common functions used by the
various passes.

llvm-svn: 173651

11 years agoImproved svn repo searching for 'make update'
Edwin Vane [Mon, 28 Jan 2013 03:19:57 +0000 (03:19 +0000)]
Improved svn repo searching for 'make update'

Use a simple recursive bash function to search for svn repos for the 'make
update' target thus including projects like clang-tools-extra.

Reviewers: bkramer, echristo
llvm-svn: 173650

11 years agoMake some code a little simpler.
Reed Kotler [Mon, 28 Jan 2013 02:46:49 +0000 (02:46 +0000)]
Make some code a little simpler.

llvm-svn: 173649

11 years agoSince ObjCARC has been refactored into its own library with its own declaration heade...
Michael Gottesman [Mon, 28 Jan 2013 01:36:00 +0000 (01:36 +0000)]
Since ObjCARC has been refactored into its own library with its own declaration header, we need to include the declaration header alongside Scalar.h in BackendUtil.

llvm-svn: 173648

11 years agoExtracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for...
Michael Gottesman [Mon, 28 Jan 2013 01:35:51 +0000 (01:35 +0000)]
Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer.

llvm-svn: 173647

11 years agoUse proper type for the index.
Bill Wendling [Mon, 28 Jan 2013 01:30:29 +0000 (01:30 +0000)]
Use proper type for the index.

llvm-svn: 173646

11 years agoTests and a minor bugfix for [dcl.attr.depend]p1 (C++11 [[carries_dependency]]
Richard Smith [Mon, 28 Jan 2013 01:15:38 +0000 (01:15 +0000)]
Tests and a minor bugfix for [dcl.attr.depend]p1 (C++11 [[carries_dependency]]
attribute).

llvm-svn: 173645

11 years agoRemove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.
Bill Wendling [Mon, 28 Jan 2013 01:11:42 +0000 (01:11 +0000)]
Remove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.

llvm-svn: 173644

11 years agoAdd a -pedantic warning: an anonymous union within an anonymous union is not
Richard Smith [Mon, 28 Jan 2013 00:54:05 +0000 (00:54 +0000)]
Add a -pedantic warning: an anonymous union within an anonymous union is not
permitted in standard C++, despite being silently accepted by many (all?) major
C++ implementations.

llvm-svn: 173643

11 years agoRemove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.
Bill Wendling [Mon, 28 Jan 2013 00:46:02 +0000 (00:46 +0000)]
Remove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.

llvm-svn: 173642

11 years agoRemove a use of AttributeWithIndex.
Bill Wendling [Mon, 28 Jan 2013 00:21:34 +0000 (00:21 +0000)]
Remove a use of AttributeWithIndex.

We want to remove AttributeWithIndex because it provides a non-encapsulated view
of the AttributeSetImpl object. Instead, use accessor methods and iterators.

Eventually, this code can be simplified because the Attribute object will hold
only one attribute instead of multiple attributes.

llvm-svn: 173641

11 years agoImprove the debug output a bit.
Bill Wendling [Sun, 27 Jan 2013 23:53:56 +0000 (23:53 +0000)]
Improve the debug output a bit.

llvm-svn: 173640

11 years agoUse proper return type for attribute index.
Bill Wendling [Sun, 27 Jan 2013 23:50:44 +0000 (23:50 +0000)]
Use proper return type for attribute index.

llvm-svn: 173639

11 years agoUse proper return type for attribute index.
Bill Wendling [Sun, 27 Jan 2013 23:49:44 +0000 (23:49 +0000)]
Use proper return type for attribute index.

llvm-svn: 173638

11 years agoPush the calculation of the 'Raw' attribute mask down into the implementation. It...
Bill Wendling [Sun, 27 Jan 2013 23:41:29 +0000 (23:41 +0000)]
Push the calculation of the 'Raw' attribute mask down into the implementation. It in turn uses the correct list for calculating the 'Raw' value.

llvm-svn: 173637

11 years agoDon't erase these methods. They're used during testing.
Bill Wendling [Sun, 27 Jan 2013 22:46:17 +0000 (22:46 +0000)]
Don't erase these methods. They're used during testing.

llvm-svn: 173636

11 years agoAdd special 'get' methods to create an Attribute with an alignment. Also do some...
Bill Wendling [Sun, 27 Jan 2013 22:43:04 +0000 (22:43 +0000)]
Add special 'get' methods to create an Attribute with an alignment. Also do some random cleanup. No functionality change.

llvm-svn: 173635

11 years ago[XCore] Add missing l2rus instructions.
Richard Osborne [Sun, 27 Jan 2013 22:28:30 +0000 (22:28 +0000)]
[XCore] Add missing l2rus instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

llvm-svn: 173634

11 years agoComment parsing: fix test in r173626 for -fms-extensions -fms-compatibility
Dmitri Gribenko [Sun, 27 Jan 2013 22:11:38 +0000 (22:11 +0000)]
Comment parsing: fix test in r173626 for -fms-extensions -fms-compatibility

llvm-svn: 173633

11 years agoPrivitize some the copy c'tor and assignment operator of uniquified objects.
Bill Wendling [Sun, 27 Jan 2013 21:38:03 +0000 (21:38 +0000)]
Privitize some the copy c'tor and assignment operator of uniquified objects.

llvm-svn: 173632

11 years agoAdd some helpful comments.
Bill Wendling [Sun, 27 Jan 2013 21:32:11 +0000 (21:32 +0000)]
Add some helpful comments.

llvm-svn: 173631

11 years agoDecl printer: fix CXXConstructExpr with implicit default argument
Dmitri Gribenko [Sun, 27 Jan 2013 21:28:24 +0000 (21:28 +0000)]
Decl printer: fix CXXConstructExpr with implicit default argument

Patch by Will Wilson.

llvm-svn: 173630

11 years ago[XCore] Add missing l2r instructions.
Richard Osborne [Sun, 27 Jan 2013 21:26:02 +0000 (21:26 +0000)]
[XCore] Add missing l2r instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

llvm-svn: 173629

11 years agos/AttrList/pImpl/g in AttributeSet. No functionality change.
Bill Wendling [Sun, 27 Jan 2013 21:23:46 +0000 (21:23 +0000)]
s/AttrList/pImpl/g in AttributeSet. No functionality change.

llvm-svn: 173628