platform/upstream/llvm.git
12 years agoDon't fixit/recover from -Wstatic-float-init when it's not an error.
David Blaikie [Tue, 29 Jan 2013 21:40:37 +0000 (21:40 +0000)]
Don't fixit/recover from -Wstatic-float-init when it's not an error.

Fix to change r173414 that lead to Clang changing const to constexpr even under
-Wno-static-float-init.

llvm-svn: 173835

12 years agoMoved S_Stop back to its previous position in the sequence order.
Michael Gottesman [Tue, 29 Jan 2013 21:39:02 +0000 (21:39 +0000)]
Moved S_Stop back to its previous position in the sequence order.

llvm-svn: 173834

12 years agoAdd a special handling case for untyped CopyFromReg node in GetCostForDef() of Schedu...
Weiming Zhao [Tue, 29 Jan 2013 21:18:43 +0000 (21:18 +0000)]
Add a special handling case for untyped CopyFromReg node in GetCostForDef() of ScheduleDAGRRList

llvm-svn: 173833

12 years agoFixed a few debug messages and some 80+ violations.
Michael Gottesman [Tue, 29 Jan 2013 21:07:53 +0000 (21:07 +0000)]
Fixed a few debug messages and some 80+ violations.

llvm-svn: 173832

12 years agoAdded some periods to some comments and added an overload for operator<< for type...
Michael Gottesman [Tue, 29 Jan 2013 21:07:51 +0000 (21:07 +0000)]
Added some periods to some comments and added an overload for operator<< for type Sequence so I can print out Sequences in debug statements.

llvm-svn: 173831

12 years agoMove the token annotator into separate files.
Daniel Jasper [Tue, 29 Jan 2013 21:01:14 +0000 (21:01 +0000)]
Move the token annotator into separate files.

No functional changes. Also removed experimental-warning from all of
clang-format's files, as it is no longer accurate.

llvm-svn: 173830

12 years agoChanged DoesObjCBlockEscape => DoesRetainableObjPtrEscape so I can use it to perform...
Michael Gottesman [Tue, 29 Jan 2013 21:00:52 +0000 (21:00 +0000)]
Changed DoesObjCBlockEscape => DoesRetainableObjPtrEscape so I can use it to perform escape analysis of other retainable object pointers in other locations.

llvm-svn: 173829

12 years agoAdd a couple of accessor methods to get the kind and values of an attribute.
Bill Wendling [Tue, 29 Jan 2013 20:45:34 +0000 (20:45 +0000)]
Add a couple of accessor methods to get the kind and values of an attribute.

llvm-svn: 173828

12 years agos/Data/Kind/g. No functionality change.
Bill Wendling [Tue, 29 Jan 2013 20:37:10 +0000 (20:37 +0000)]
s/Data/Kind/g. No functionality change.

llvm-svn: 173827

12 years ago[Preprocessor] When checking if we can concatenate two tokens, check
Argyrios Kyrtzidis [Tue, 29 Jan 2013 20:28:24 +0000 (20:28 +0000)]
[Preprocessor] When checking if we can concatenate two tokens, check
if they were already concatenated in source using the spelling locations
even if they came from a macro expansion.

This fixes an issue where a GUID passed as macro argument ends up
malformed after preprocessing because we added spaces inside it.

rdar://13016645

llvm-svn: 173826

12 years ago[driver] Refactor the driver so that a failing commands doesn't prevent
Chad Rosier [Tue, 29 Jan 2013 20:15:05 +0000 (20:15 +0000)]
[driver] Refactor the driver so that a failing commands doesn't prevent
subsequent commands from being executed.

The diagnostics generation isn't designed for this use case, so add a note to
fix this in the very near future.  For now, just generated the diagnostics for
the first failing command.
Part of rdar://12984531

llvm-svn: 173825

12 years agoremove targetInfo and layout from ELFTargetLayout
Shankar Easwaran [Tue, 29 Jan 2013 20:13:16 +0000 (20:13 +0000)]
remove targetInfo and layout from ELFTargetLayout

llvm-svn: 173824

12 years ago<rdar://problem/13107904>
Greg Clayton [Tue, 29 Jan 2013 20:03:58 +0000 (20:03 +0000)]
<rdar://problem/13107904>

wchar_t causes problem with certain compilers. Removing it for now.

llvm-svn: 173823

12 years ago[ELF] Fix header sort order.
Michael J. Spencer [Tue, 29 Jan 2013 19:53:41 +0000 (19:53 +0000)]
[ELF] Fix header sort order.

llvm-svn: 173822

12 years agoImprove formatting of code with comments.
Daniel Jasper [Tue, 29 Jan 2013 19:41:55 +0000 (19:41 +0000)]
Improve formatting of code with comments.

Before:
aaaaaaa(aaaaaa( // comment
                aaaaaaa));
<big mess>

After:
aaaaaaa(aaaaaa( // comment
    aaaaaaaa));
function(/* parameter 1 */ aaaaaaa,
         /* parameter 2 */ aaaaaaa,
         /* parameter 3 */ aaaaaaa,
         /* parameter 4 */ aaaaaaa);

(the latter example was only wrong in the one-arg-per-line mode, e.g. in
Google style).

llvm-svn: 173821

12 years agoSupport artificial parameters in function types.
David Blaikie [Tue, 29 Jan 2013 19:35:24 +0000 (19:35 +0000)]
Support artificial parameters in function types.

Provides the functionality for Clang change r172911 - I just had this still
lying around.

llvm-svn: 173820

12 years agoUse multiclass for post-increment store instructions.
Jyotsna Verma [Tue, 29 Jan 2013 18:42:41 +0000 (18:42 +0000)]
Use multiclass for post-increment store instructions.

llvm-svn: 173816

12 years ago[tsan] Fix checks for siginfo_t in tests
Will Dietz [Tue, 29 Jan 2013 18:29:34 +0000 (18:29 +0000)]
[tsan] Fix checks for siginfo_t in tests

llvm-svn: 173815

12 years agoAdd constant extender support for MInst type instructions.
Jyotsna Verma [Tue, 29 Jan 2013 18:18:50 +0000 (18:18 +0000)]
Add constant extender support for MInst type instructions.

llvm-svn: 173813

12 years agoRemove dead code.
Evan Cheng [Tue, 29 Jan 2013 18:08:22 +0000 (18:08 +0000)]
Remove dead code.

llvm-svn: 173812

12 years agoMark a struct definition in an objc container with the TopLevelDeclInObjCContainer...
Argyrios Kyrtzidis [Tue, 29 Jan 2013 18:00:54 +0000 (18:00 +0000)]
Mark a struct definition in an objc container with the TopLevelDeclInObjCContainer bit.

Fixes accurately getting a cursor inside an objc container containing a struct definition,
from a PCH/preamble file.

rdar://12584613

llvm-svn: 173811

12 years agoFixing warnings revealed by gcc release build
Edwin Vane [Tue, 29 Jan 2013 17:42:24 +0000 (17:42 +0000)]
Fixing warnings revealed by gcc release build

Fixed set-but-not-used warnings.

Reviewer: gribozavr
llvm-svn: 173810

12 years agoLoopVectorize: Clean up ValueMap a bit and avoid double lookups.
Benjamin Kramer [Tue, 29 Jan 2013 17:31:33 +0000 (17:31 +0000)]
LoopVectorize: Clean up ValueMap a bit and avoid double lookups.

No intended functionality change.

llvm-svn: 173809

12 years ago[ELF] Add support for IFUNC.
Michael J. Spencer [Tue, 29 Jan 2013 16:38:03 +0000 (16:38 +0000)]
[ELF] Add support for IFUNC.

This sadly doesn't have a test for the final
output because llvm-objdump can't dump relocations
that don't belong to a section :(

llvm-svn: 173808

12 years agoR600/AMDILPeepholeOptimizer.cpp: Tweak std::make_pair to satisfy C++11.
NAKAMURA Takumi [Tue, 29 Jan 2013 16:31:56 +0000 (16:31 +0000)]
R600/AMDILPeepholeOptimizer.cpp: Tweak std::make_pair to satisfy C++11.

llvm-svn: 173807

12 years agoAllow all parameters on next line for function calls in Chrome.
Daniel Jasper [Tue, 29 Jan 2013 16:03:49 +0000 (16:03 +0000)]
Allow all parameters on next line for function calls in Chrome.

The style guide only forbids this for function declarations. So,
now

someFunction(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

Is allowed in Chromium mode.

llvm-svn: 173806

12 years agoSplit ">>" in "A<B<C> >" in Chromium style.
Daniel Jasper [Tue, 29 Jan 2013 15:19:38 +0000 (15:19 +0000)]
Split ">>" in "A<B<C> >" in Chromium style.

It needs to be compatible with C++03.

llvm-svn: 173805

12 years agoAttributeSet::get(): Fix a valgrind error. It doesn't affect actual behavior, though.
NAKAMURA Takumi [Tue, 29 Jan 2013 15:18:16 +0000 (15:18 +0000)]
AttributeSet::get(): Fix a valgrind error. It doesn't affect actual behavior, though.

Don't touch I->first on the end iterator, I == E!

llvm-svn: 173804

12 years agoFix uninitialized error caused by r173801.
Daniel Jasper [Tue, 29 Jan 2013 15:15:59 +0000 (15:15 +0000)]
Fix uninitialized error caused by r173801.

llvm-svn: 173803

12 years agoFix a crash in OpenCL code by using the proper (RHS) bit-width.
Joey Gouly [Tue, 29 Jan 2013 15:09:40 +0000 (15:09 +0000)]
Fix a crash in OpenCL code by using the proper (RHS) bit-width.

llvm-svn: 173802

12 years agoCalculate the split penalty upfront.
Daniel Jasper [Tue, 29 Jan 2013 15:03:01 +0000 (15:03 +0000)]
Calculate the split penalty upfront.

This is
a) More efficient.
b) Important as we move forward with further metrics for penalty.

No functional changes intended.

llvm-svn: 173801

12 years ago[msan] Cleanup public interface header.
Evgeniy Stepanov [Tue, 29 Jan 2013 14:33:29 +0000 (14:33 +0000)]
[msan] Cleanup public interface header.

Moved everything users are not supposed to use to a private interface header.
Documented all public interfaces. Made them safe to use even if built without
MemorySanitizer.

llvm-svn: 173800

12 years agotsan: dump stack on internal assert failure
Dmitry Vyukov [Tue, 29 Jan 2013 14:20:12 +0000 (14:20 +0000)]
tsan: dump stack on internal assert failure

llvm-svn: 173799

12 years agoFix typo in X86BaseInfo.h that I introduced in r157818.
Hans Wennborg [Tue, 29 Jan 2013 14:05:57 +0000 (14:05 +0000)]
Fix typo in X86BaseInfo.h that I introduced in r157818.

llvm-svn: 173798

12 years agotsan: support for inprocess symbolizer
Dmitry Vyukov [Tue, 29 Jan 2013 13:05:30 +0000 (13:05 +0000)]
tsan: support for inprocess symbolizer

llvm-svn: 173797

12 years agotsan: remember when we are inside of symbolizer code (required for inprocess symbolizer)
Dmitry Vyukov [Tue, 29 Jan 2013 13:03:07 +0000 (13:03 +0000)]
tsan: remember when we are inside of symbolizer code (required for inprocess symbolizer)

llvm-svn: 173796

12 years agoASan: fix lint
Alexey Samsonov [Tue, 29 Jan 2013 12:08:12 +0000 (12:08 +0000)]
ASan: fix lint

llvm-svn: 173795

12 years ago[sanitizer] Copy sanitizer headers to the build tree.
Evgeniy Stepanov [Tue, 29 Jan 2013 11:46:06 +0000 (11:46 +0000)]
[sanitizer] Copy sanitizer headers to the build tree.

llvm-svn: 173794

12 years agoFix a comment and reformat clang-format with clang-format
Daniel Jasper [Tue, 29 Jan 2013 11:27:30 +0000 (11:27 +0000)]
Fix a comment and reformat clang-format with clang-format

Not all changes might be ideal, but IMO all are acceptable.

llvm-svn: 173793

12 years agoInitial support for multiple variable declarations.
Daniel Jasper [Tue, 29 Jan 2013 11:21:01 +0000 (11:21 +0000)]
Initial support for multiple variable declarations.

Before:
  SomeType aaaaaaaaaaaaaaaaa = aaaaaa->aaaaaaaaaaaaaaaaa(),
      aaaaaaaaaaa = aaaaaa->aaaaaaaaaaa();
After:
  SomeType aaaaaaaaaaaaaaaaa = aaaaaa->aaaaaaaaaaaaaaaaa(),
           aaaaaaaaaaa = aaaaaa->aaaaaaaaaaa();

llvm-svn: 173792

12 years agoAdd a diagnostic for an OpenCL kernel with a pointer pointer argument.
Joey Gouly [Tue, 29 Jan 2013 10:54:06 +0000 (10:54 +0000)]
Add a diagnostic for an OpenCL kernel with a pointer pointer argument.
Also refactor the surrounding code a little.

llvm-svn: 173791

12 years agoTest update missed in r173789.
Richard Smith [Tue, 29 Jan 2013 10:18:33 +0000 (10:18 +0000)]
Test update missed in r173789.

llvm-svn: 173790

12 years agoProduce a diagnostic if alignas is applied to an expression. Neither C11 nor
Richard Smith [Tue, 29 Jan 2013 10:18:18 +0000 (10:18 +0000)]
Produce a diagnostic if alignas is applied to an expression. Neither C11 nor
C++11 allows that.

llvm-svn: 173789

12 years agoDowngrade 'attribute ignored when parsing type' from error to warning, to match
Richard Smith [Tue, 29 Jan 2013 10:02:16 +0000 (10:02 +0000)]
Downgrade 'attribute ignored when parsing type' from error to warning, to match
the diagnostic's warn_ name. Switch some places (notably C++11 attributes)
which really wanted an error over to a different diagnostic. Finally, suppress
the diagnostic entirely for __ptr32, __ptr64 and __w64, to avoid producing
diagnostics in important system headers.

llvm-svn: 173788

12 years agoReverting changes from r173785 (removing empty lines before "}").
Daniel Jasper [Tue, 29 Jan 2013 10:00:16 +0000 (10:00 +0000)]
Reverting changes from r173785 (removing empty lines before "}").

This needs some more thinking, e.g. for namespaces, chains of if-else
if, ...

llvm-svn: 173787

12 years agoasan: fix the test
Dmitry Vyukov [Tue, 29 Jan 2013 09:59:53 +0000 (09:59 +0000)]
asan: fix the test

llvm-svn: 173786

12 years agoRemove empty lines before "}".
Daniel Jasper [Tue, 29 Jan 2013 09:42:11 +0000 (09:42 +0000)]
Remove empty lines before "}".

Those empty lines waste vertical whitespace and almost never
increase readability.

Before:
void f() {
  DoSomething();

}

After:
void f() {
  DoSomething();
}

llvm-svn: 173785

12 years agotsan: fix the message (tsan is not asan)
Dmitry Vyukov [Tue, 29 Jan 2013 09:39:58 +0000 (09:39 +0000)]
tsan: fix the message (tsan is not asan)

llvm-svn: 173784

12 years agotsan: add IsSymbolizerAvailable() function for querying for presence of internal...
Dmitry Vyukov [Tue, 29 Jan 2013 09:35:14 +0000 (09:35 +0000)]
tsan: add IsSymbolizerAvailable() function for querying for presence of internal/external symbolizer

llvm-svn: 173783

12 years agotsan: add interceptor stubs for stat family of functions
Dmitry Vyukov [Tue, 29 Jan 2013 09:23:09 +0000 (09:23 +0000)]
tsan: add interceptor stubs for stat family of functions

llvm-svn: 173782

12 years agoHopefully fix the Windows build failure introduced in r173769
Timur Iskhodzhanov [Tue, 29 Jan 2013 09:09:27 +0000 (09:09 +0000)]
Hopefully fix the Windows build failure introduced in r173769

llvm-svn: 173781

12 years agoFix 64-bit atomic operations in Thumb mode.
Tim Northover [Tue, 29 Jan 2013 09:06:13 +0000 (09:06 +0000)]
Fix 64-bit atomic operations in Thumb mode.

The ARM and Thumb variants of LDREXD and STREXD have different constraints and
take different operands. Previously the code expanding atomic operations didn't
take this into account and asserted in Thumb mode.

llvm-svn: 173780

12 years agoImplement C++11 [dcl.align]p1 and C11 6.7.5/2 rules for alignas and _Alignas.
Richard Smith [Tue, 29 Jan 2013 09:02:09 +0000 (09:02 +0000)]
Implement C++11 [dcl.align]p1 and C11 6.7.5/2 rules for alignas and _Alignas.

llvm-svn: 173779

12 years ago[ASan] fix deallocation hook in allocator2: according to specification, dealloc hook...
Alexey Samsonov [Tue, 29 Jan 2013 08:19:11 +0000 (08:19 +0000)]
[ASan] fix deallocation hook in allocator2: according to specification, dealloc hook should be called before deallocating memory

llvm-svn: 173778

12 years agoMerge SSE and AVX shuffle instructions in the comment printer.
Craig Topper [Tue, 29 Jan 2013 07:54:31 +0000 (07:54 +0000)]
Merge SSE and AVX shuffle instructions in the comment printer.

llvm-svn: 173777

12 years ago[ASan] Do allocate memory even for zero-size allocation requests. Explain why we...
Alexey Samsonov [Tue, 29 Jan 2013 07:51:34 +0000 (07:51 +0000)]
[ASan] Do allocate memory even for zero-size allocation requests. Explain why we have to do this in comments.

llvm-svn: 173776

12 years agoMIsched: cleanup code. Use isBoundaryNode().
Andrew Trick [Tue, 29 Jan 2013 06:26:35 +0000 (06:26 +0000)]
MIsched: cleanup code. Use isBoundaryNode().

llvm-svn: 173775

12 years agoFixed 2 more header comments...
Michael Gottesman [Tue, 29 Jan 2013 05:07:18 +0000 (05:07 +0000)]
Fixed 2 more header comments...

llvm-svn: 173774

12 years agoFixed header comment.
Michael Gottesman [Tue, 29 Jan 2013 05:05:17 +0000 (05:05 +0000)]
Fixed header comment.

llvm-svn: 173773

12 years agoFixed some whitespace/80+ violations. Also added a space after a namespace declaration.
Michael Gottesman [Tue, 29 Jan 2013 04:58:30 +0000 (04:58 +0000)]
Fixed some whitespace/80+ violations. Also added a space after a namespace declaration.

llvm-svn: 173772

12 years agoC++11 status:
Richard Smith [Tue, 29 Jan 2013 04:55:18 +0000 (04:55 +0000)]
C++11 status:
 * Mark 'sequence points' as done now we have a warning for unsequenced operations
 * Mark 'memory model' as done now we correctly model bitfield operations

llvm-svn: 173771

12 years agoAdded missing dashes from header declaration comment.
Michael Gottesman [Tue, 29 Jan 2013 04:53:55 +0000 (04:53 +0000)]
Added missing dashes from header declaration comment.

llvm-svn: 173770

12 years agoJuggled Debug.h from ObjCARC.h to only the including cpp files that
Michael Gottesman [Tue, 29 Jan 2013 04:51:59 +0000 (04:51 +0000)]
Juggled Debug.h from ObjCARC.h to only the including cpp files that
actually have DEBUG statements. Also changed raw_ostream in said header
to be a forward declaration (removing an include).

llvm-svn: 173769

12 years agoPropagate the spelling list index for an attribute across template instantiation.
Richard Smith [Tue, 29 Jan 2013 04:21:28 +0000 (04:21 +0000)]
Propagate the spelling list index for an attribute across template instantiation.

llvm-svn: 173768

12 years agoSorted includes using utils/sort_includes.
Michael Gottesman [Tue, 29 Jan 2013 04:20:52 +0000 (04:20 +0000)]
Sorted includes using utils/sort_includes.

llvm-svn: 173767

12 years agoPR15017: A '>' can appear after a type-specifier in a template-argument-list.
Richard Smith [Tue, 29 Jan 2013 04:13:32 +0000 (04:13 +0000)]
PR15017: A '>' can appear after a type-specifier in a template-argument-list.
It turns out that there's no correctness bug here (because we can't have a type
definition in this location), but there was a diagnostic bug.

llvm-svn: 173766

12 years agoAdd a test case for attribute print.
Michael Han [Tue, 29 Jan 2013 04:13:20 +0000 (04:13 +0000)]
Add a test case for attribute print.

llvm-svn: 173765

12 years agoAdded two missing headers from ObjCARCAliasAnalysis.h.
Michael Gottesman [Tue, 29 Jan 2013 04:09:24 +0000 (04:09 +0000)]
Added two missing headers from ObjCARCAliasAnalysis.h.

This was missed since whenever I was including ObjCARCAliasAnalysis.h, I
was including ObjCARC.h before it which included these includes
(resulting in no compilation breakage).

llvm-svn: 173764

12 years agoRemoved InstCombine/Targets as library dependencies for libObjCARCOpts since they...
Michael Gottesman [Tue, 29 Jan 2013 04:05:17 +0000 (04:05 +0000)]
Removed InstCombine/Targets as library dependencies for libObjCARCOpts since they are unnecessary.

llvm-svn: 173763

12 years agoModify the tests for the (sorted) order that the attributes come out as now.
Bill Wendling [Tue, 29 Jan 2013 03:21:00 +0000 (03:21 +0000)]
Modify the tests for the (sorted) order that the attributes come out as now.

llvm-svn: 173762

12 years agoConvert getAttributes() to return an AttributeSetNode.
Bill Wendling [Tue, 29 Jan 2013 03:20:31 +0000 (03:20 +0000)]
Convert getAttributes() to return an AttributeSetNode.

The AttributeSetNode contains all of the attributes. This removes one (hopefully
last) use of the Attribute class as a container of multiple attributes.

llvm-svn: 173761

12 years agoExtracted ObjCARCContract from ObjCARCOpts into its own file.
Michael Gottesman [Tue, 29 Jan 2013 03:03:03 +0000 (03:03 +0000)]
Extracted ObjCARCContract from ObjCARCOpts into its own file.

This also required adding 2x headers Dependency Analysis.h/Provenance Analysis.h
and a .cpp file DependencyAnalysis.cpp to unentangle the dependencies inbetween
ObjCARCContract and ObjCARCOpts.

llvm-svn: 173760

12 years agoRemoved some cruft from ObjCARCAliasAnalysis.cpp.
Michael Gottesman [Tue, 29 Jan 2013 03:02:59 +0000 (03:02 +0000)]
Removed some cruft from ObjCARCAliasAnalysis.cpp.

llvm-svn: 173759

12 years agoPR15100: look through type sugar when determining whether we have one of the
Richard Smith [Tue, 29 Jan 2013 02:49:47 +0000 (02:49 +0000)]
PR15100: look through type sugar when determining whether we have one of the
forms of 'main' which we accept as an extension.

llvm-svn: 173758

12 years agoSince an address (0x12346) is an expression, be brief.
Enrico Granata [Tue, 29 Jan 2013 02:46:04 +0000 (02:46 +0000)]
Since an address (0x12346) is an expression, be brief.

llvm-svn: 173757

12 years agoFold tests for C++ 'main' into a single file.
Richard Smith [Tue, 29 Jan 2013 02:42:09 +0000 (02:42 +0000)]
Fold tests for C++ 'main' into a single file.

llvm-svn: 173756

12 years agoTeach SDISel to combine fsin / fcos into a fsincos node if the following
Evan Cheng [Tue, 29 Jan 2013 02:32:37 +0000 (02:32 +0000)]
Teach SDISel to combine fsin / fcos into a fsincos node if the following
conditions are met:
1. They share the same operand and are in the same BB.
2. Both outputs are used.
3. The target has a native instruction that maps to ISD::FSINCOS node or
   the target provides a sincos library call.

Implemented the generic optimization in sdisel and enabled it for
Mac OSX. Also added an additional optimization for x86_64 Mac OSX by
using an alternative entry point __sincos_stret which returns the two
results in xmm0 / xmm1.

rdar://13087969
PR13204

llvm-svn: 173755

12 years agoTest that we print MS keyword attributes without a __declspec(...) adornment.
Richard Smith [Tue, 29 Jan 2013 02:31:57 +0000 (02:31 +0000)]
Test that we print MS keyword attributes without a __declspec(...) adornment.

llvm-svn: 173754

12 years ago<rdar://problem/12552374>
Enrico Granata [Tue, 29 Jan 2013 01:48:30 +0000 (01:48 +0000)]
<rdar://problem/12552374>

Replacing the address argument type with address-expression in cases where StringToAddress() is used, and hence an expression can be passed where previously only a numeric address was allowed
This makes the documentation more clear and helps users discover that they can truly pass in an expression in these situations.

llvm-svn: 173753

12 years agoTreat alignas and _Alignas as keyword attributes. This allows us to
Richard Smith [Tue, 29 Jan 2013 01:48:07 +0000 (01:48 +0000)]
Treat alignas and _Alignas as keyword attributes. This allows us to
pretty-print them properly (modulo the more general badness in alignment
attribute printing).

llvm-svn: 173752

12 years agoUse an AttrBuilder to generate the correct AttributeSet.
Bill Wendling [Tue, 29 Jan 2013 01:43:29 +0000 (01:43 +0000)]
Use an AttrBuilder to generate the correct AttributeSet.

We no longer accept an encoded integer as representing all of the
attributes. Convert this via the AttrBuilder class into an AttributeSet with the
correct representation (an AttributeSetImpl that holds a list of Attribute
objects).

llvm-svn: 173750

12 years agoActually remove the hack which was blocking the Borland-style attributes from
Richard Smith [Tue, 29 Jan 2013 01:38:41 +0000 (01:38 +0000)]
Actually remove the hack which was blocking the Borland-style attributes from
working, and add the missing attribute spellings. This brings _pascal,
_fastcall, _stdcall and _cdecl to life in -fborland-extensions mode.

llvm-svn: 173749

12 years ago<rdar://problem/12890171>
Enrico Granata [Tue, 29 Jan 2013 01:35:01 +0000 (01:35 +0000)]
<rdar://problem/12890171>

Providing a compact display mode for "po" to use where the convenience variable name and the pointer value are both hidden.
This is for convenience when dealing with ObjC instances where the description often gets it right and the debugger-provided information is not useful to most people.
If you need either of these, "expr" will still show them.

llvm-svn: 173748

12 years agoDon't crash while printing APValues that are lvalues casted to a
Douglas Gregor [Tue, 29 Jan 2013 01:26:43 +0000 (01:26 +0000)]
Don't crash while printing APValues that are lvalues casted to a
decidedly non-reference, non-pointer type. Fixes <rdar://problem/13090123>.

llvm-svn: 173747

12 years agoReplace AS_MSTypespec with AS_Keyword, for representing any attribute spelled
Richard Smith [Tue, 29 Jan 2013 01:24:26 +0000 (01:24 +0000)]
Replace AS_MSTypespec with AS_Keyword, for representing any attribute spelled
as a keyword. Rationalize existing attributes to use it as appropriate, and to
not lie about some __declspec attributes being GNU attributes. In passing,
remove a gross hack which was discarding attributes which we could handle. This
results in us actually respecting the __pascal keyword again.

llvm-svn: 173746

12 years ago<rdar://problem/12524607>
Greg Clayton [Tue, 29 Jan 2013 01:17:09 +0000 (01:17 +0000)]
<rdar://problem/12524607>

Flush the process when symbols are loaded/unloaded manually. This was going on in:
- "target modules load" command
- SBTarget::SetSectionLoadAddress(...)
- SBTarget::ClearSectionLoadAddress(...)
- SBTarget::SetModuleLoadAddress(...)
- SBTarget::ClearModuleLoadAddress(...)

llvm-svn: 173745

12 years agoAbstract the behavior of when to use base-class tail padding.
John McCall [Tue, 29 Jan 2013 01:14:22 +0000 (01:14 +0000)]
Abstract the behavior of when to use base-class tail padding.

For fun, I added a comedy "actually obey the C++11 POD rules" option
which nobody is allowed to use.

llvm-svn: 173744

12 years ago[ELF] Give Chunk a ELFTargetInfo.
Michael J. Spencer [Tue, 29 Jan 2013 01:07:47 +0000 (01:07 +0000)]
[ELF] Give Chunk a ELFTargetInfo.

llvm-svn: 173743

12 years agoConvert the AttrBuilder into a list of Attributes instead of one Attribute object...
Bill Wendling [Tue, 29 Jan 2013 01:02:03 +0000 (01:02 +0000)]
Convert the AttrBuilder into a list of Attributes instead of one Attribute object that holds all of its attributes.

llvm-svn: 173742

12 years ago[ELF] Remove OwningPtr from the Chunk::write interface.
Michael J. Spencer [Tue, 29 Jan 2013 01:00:21 +0000 (01:00 +0000)]
[ELF] Remove OwningPtr from the Chunk::write interface.

llvm-svn: 173741

12 years ago[ELF] Clean up doxygen comments.
Michael J. Spencer [Tue, 29 Jan 2013 01:00:04 +0000 (01:00 +0000)]
[ELF] Clean up doxygen comments.

llvm-svn: 173740

12 years agoFormatting correction
Andrew Kaylor [Tue, 29 Jan 2013 00:50:18 +0000 (00:50 +0000)]
Formatting correction

llvm-svn: 173739

12 years agoS'more small non-functional changes in comments and #includes.
Bill Wendling [Tue, 29 Jan 2013 00:48:16 +0000 (00:48 +0000)]
S'more small non-functional changes in comments and #includes.

llvm-svn: 173738

12 years agoDescribe the data formatters as part of the architecture
Enrico Granata [Tue, 29 Jan 2013 00:42:12 +0000 (00:42 +0000)]
Describe the data formatters as part of the architecture

llvm-svn: 173734

12 years agoReorder some functions and add comments. No functionality change.
Bill Wendling [Tue, 29 Jan 2013 00:34:06 +0000 (00:34 +0000)]
Reorder some functions and add comments. No functionality change.

llvm-svn: 173733

12 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

12 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

12 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

12 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

12 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