platform/upstream/llvm.git
11 years agoMake sure a value is returned for Thread::ReturnFromFrame().
Greg Clayton [Fri, 1 Feb 2013 02:52:31 +0000 (02:52 +0000)]
Make sure a value is returned for Thread::ReturnFromFrame().

llvm-svn: 174141

11 years agoEnable -fno-altivec, -mno-altivec for PowerPC.
Bill Schmidt [Fri, 1 Feb 2013 02:14:03 +0000 (02:14 +0000)]
Enable -fno-altivec, -mno-altivec for PowerPC.

Introduces these negation forms explicitly and uses them to control a new
"altivec" target feature for PowerPC.  This allows avoiding generating
Altivec instructions on processors that support Altivec.

The new test case verifies that the Altivec "lvx" instruction is not
used when -fno-altivec is present on the command line.

llvm-svn: 174140

11 years ago[Sema][Attr]Fix alignment attribute printing.
Michael Han [Fri, 1 Feb 2013 01:19:17 +0000 (01:19 +0000)]
[Sema][Attr]Fix alignment attribute printing.

Remove "IsMSDeclspec" argument from Align attribute since the arguments in Attr.td should
only model those appear in source code. Introduce attribute Accessor, and teach TableGen
to generate syntax kind accessors for Align attribute, and use those accessors to decide
if an alignment attribute is a declspec attribute.

llvm-svn: 174133

11 years agoRemove some dead code, improve some asserts, and other assorted changes. No functiona...
Bill Wendling [Fri, 1 Feb 2013 01:04:27 +0000 (01:04 +0000)]
Remove some dead code, improve some asserts, and other assorted changes. No functionality change.

llvm-svn: 174132

11 years agoAdd a comment explaining an unavailable optimization.
Dan Gohman [Fri, 1 Feb 2013 00:49:06 +0000 (00:49 +0000)]
Add a comment explaining an unavailable optimization.

llvm-svn: 174131

11 years agoRemove one of the odious 'Raw' methods.
Bill Wendling [Fri, 1 Feb 2013 00:48:14 +0000 (00:48 +0000)]
Remove one of the odious 'Raw' methods.

llvm-svn: 174130

11 years agoAllow the target to give out the size of the red zone for given ABIs.
Greg Clayton [Fri, 1 Feb 2013 00:47:49 +0000 (00:47 +0000)]
Allow the target to give out the size of the red zone for given ABIs.

A bit of cleanup in the heap module.

llvm-svn: 174129

11 years agoGet rid for switch statement warning for unhandled cases.
Greg Clayton [Fri, 1 Feb 2013 00:46:49 +0000 (00:46 +0000)]
Get rid for switch statement warning for unhandled cases.

llvm-svn: 174128

11 years agoFixed register dumping for contained-regs.
Greg Clayton [Fri, 1 Feb 2013 00:45:52 +0000 (00:45 +0000)]
Fixed register dumping for contained-regs.

llvm-svn: 174127

11 years agoConsistently format sample diagnostics on this page.
Richard Smith [Fri, 1 Feb 2013 00:45:12 +0000 (00:45 +0000)]
Consistently format sample diagnostics on this page.

llvm-svn: 174126

11 years agoclang/test/Index/headerfile-comment-to-html.m: Try to unbreak libxml2-less hosts...
NAKAMURA Takumi [Fri, 1 Feb 2013 00:17:45 +0000 (00:17 +0000)]
clang/test/Index/headerfile-comment-to-html.m: Try to unbreak libxml2-less hosts to eliminate "CommentXMLValid".

llvm-svn: 174124

11 years agoUse iterators instead of relying upon a bitmask of attributes to remove attributes...
Bill Wendling [Fri, 1 Feb 2013 00:13:50 +0000 (00:13 +0000)]
Use iterators instead of relying upon a bitmask of attributes to remove attributes from an AttrBuilder.

llvm-svn: 174123

11 years agoRewrite instsimplify's handling if icmp on pointer values to remove the
Dan Gohman [Fri, 1 Feb 2013 00:11:13 +0000 (00:11 +0000)]
Rewrite instsimplify's handling if icmp on pointer values to remove the
remaining use of AliasAnalysis concepts such as isIdentifiedObject to
prove pointer inequality.

@external_compare in test/Transforms/InstSimplify/compare.ll shows a simple
case where a noalias argument can be equal to a global variable address, and
while AliasAnalysis can get away with saying that these pointers don't alias,
instsimplify cannot say that they are not equal.

llvm-svn: 174122

11 years agoFix another typo in the classof definitions that doesn't (currently)
Chandler Carruth [Fri, 1 Feb 2013 00:04:33 +0000 (00:04 +0000)]
Fix another typo in the classof definitions that doesn't (currently)
have any effect. Spotted by Eli in review, thanks!!!

llvm-svn: 174121

11 years agoAdd iterators to the AttributeSet class so that we can access the Attributes in a...
Bill Wendling [Thu, 31 Jan 2013 23:53:05 +0000 (23:53 +0000)]
Add iterators to the AttributeSet class so that we can access the Attributes in a nice way.

llvm-svn: 174120

11 years agoAn alloca can be equal to an argument. It can't *alias* an alloca, but it could
Dan Gohman [Thu, 31 Jan 2013 23:49:33 +0000 (23:49 +0000)]
An alloca can be equal to an argument. It can't *alias* an alloca, but it could
be equal, since there's nothing preventing a caller from correctly predicting
the stack location of an alloca.

llvm-svn: 174119

11 years agoSwitch the code added in r173885 to use the new, shiny RTTI
Chandler Carruth [Thu, 31 Jan 2013 23:43:14 +0000 (23:43 +0000)]
Switch the code added in r173885 to use the new, shiny RTTI
infrastructure on MCStreamer to test for whether there is an
MCELFStreamer object available.

This is just a cleanup on the AsmPrinter side of things, moving ad-hoc
tests of random APIs to a direct type query. But the AsmParser
completely broken. There were no tests, it just blindly cast its
streamer to an MCELFStreamer and started manipulating it.

I don't have a test case -- this actually failed on LLVM's own
regression test suite. Unfortunately the failure only appears when the
stars, compilers, and runtime align to misbehave when we read a pointer
to a formatted_raw_ostream as-if it were an MCAssembler. =/

UBSan would catch this immediately.

Many thanks to Matt for doing about 80% of the debugging work here in
GDB, Jim for helping to explain how exactly to fix this, and others for
putting up with the hair pulling that ensued during debugging it.

llvm-svn: 174118

11 years agoFix a think-o in the condition here. =[ I would commit the test that
Chandler Carruth [Thu, 31 Jan 2013 23:43:12 +0000 (23:43 +0000)]
Fix a think-o in the condition here. =[ I would commit the test that
caught this, but I want that in a separate commit in case there is
a need to revert the actual functional bit as part of reverting other
patches. This way, the commits relating to just getting the RTTI bits in
place are separate from the functional changes that start using them.

llvm-svn: 174117

11 years agos/AttrBuilder::addAttributes/AttrBuilder::addAttribute/g because that's more descript...
Bill Wendling [Thu, 31 Jan 2013 23:38:01 +0000 (23:38 +0000)]
s/AttrBuilder::addAttributes/AttrBuilder::addAttribute/g because that's more descriptive of what it actually is.

llvm-svn: 174116

11 years agoFix a copy/paste-o that got missed because 'check' doesn't build lto.
Chandler Carruth [Thu, 31 Jan 2013 23:34:47 +0000 (23:34 +0000)]
Fix a copy/paste-o that got missed because 'check' doesn't build lto.

llvm-svn: 174115

11 years agoComment parsing: add more comments to CommentCommands.td
Dmitri Gribenko [Thu, 31 Jan 2013 23:31:14 +0000 (23:31 +0000)]
Comment parsing: add more comments to CommentCommands.td

I hope the ASCII art delimiters are OK, since they group *groups* of commands --
that is really helpful.

llvm-svn: 174114

11 years agoGive the MCStreamer class hierarchy LLVM RTTI facilities for use with
Chandler Carruth [Thu, 31 Jan 2013 23:29:57 +0000 (23:29 +0000)]
Give the MCStreamer class hierarchy LLVM RTTI facilities for use with
isa<> and dyn_cast<>. In several places, code is already hacking around
the absence of this, and there seem to be several interfaces that might
be lifted and/or devirtualized using this.

This change was based on a discussion with Jim Grosbach about how best
to handle testing for specific MCStreamer subclasses. He said that this
was the correct end state, and everything else was too hacky so
I decided to just make it so.

No functionality should be changed here, this is just threading the kind
through all the constructors and setting up the classof overloads.

llvm-svn: 174113

11 years agoEscape backslash in the comment.
Dmitri Gribenko [Thu, 31 Jan 2013 23:20:06 +0000 (23:20 +0000)]
Escape backslash in the comment.

llvm-svn: 174112

11 years agoUpdate the tests.
Bill Wendling [Thu, 31 Jan 2013 23:17:12 +0000 (23:17 +0000)]
Update the tests.

This update coincides with r174110. That change ordered the attributes
alphabetically.

llvm-svn: 174111

11 years agoRemove the AttrBuilder form of the Attribute::get creators.
Bill Wendling [Thu, 31 Jan 2013 23:16:25 +0000 (23:16 +0000)]
Remove the AttrBuilder form of the Attribute::get creators.

The AttrBuilder is for building a collection of attributes. The Attribute object
holds only one attribute. So it's not really useful for the Attribute object to
have a creator which takes an AttrBuilder.

This has two fallouts:

1. The AttrBuilder no longer holds its internal attributes in a bit-mask form.
2. The attributes are now ordered alphabetically (hence why the tests have changed).

llvm-svn: 174110

11 years ago[Comment parsing] Add support for recognizing
Fariborz Jahanian [Thu, 31 Jan 2013 23:12:39 +0000 (23:12 +0000)]
[Comment parsing] Add support for recognizing
\headerfile command and representing it in an xml
document. Patch reviewed by Dmitri Gribenko.
// rdar://12397511

llvm-svn: 174109

11 years agoRegenerate configure to hopefully fix buildbot breakage. Oh how I love autoconf.
Richard Smith [Thu, 31 Jan 2013 23:02:23 +0000 (23:02 +0000)]
Regenerate configure to hopefully fix buildbot breakage. Oh how I love autoconf.

llvm-svn: 174108

11 years ago[Core] Only complain about undefined symbols if they are marked as canBeNullNever.
Michael J. Spencer [Thu, 31 Jan 2013 22:56:13 +0000 (22:56 +0000)]
[Core] Only complain about undefined symbols if they are marked as canBeNullNever.

llvm-svn: 174107

11 years agoUpdate AMDGPURegisterInfo::eliminateFrameIndex() corresponding to r174083.
NAKAMURA Takumi [Thu, 31 Jan 2013 22:55:51 +0000 (22:55 +0000)]
Update AMDGPURegisterInfo::eliminateFrameIndex() corresponding to r174083.

llvm-svn: 174106

11 years ago[analyzer]RetainCount: Fix an autorelease related false positive.
Anna Zaks [Thu, 31 Jan 2013 22:36:17 +0000 (22:36 +0000)]
[analyzer]RetainCount: Fix an autorelease related false positive.

The Cnt variable is adjusted (incremented) for simplification of
checking logic. The increment should not be stored in the state.

llvm-svn: 174104

11 years agoAdd -Wno-nested-anon-types to -pedantic builds of LLVM. This Clang warning
Richard Smith [Thu, 31 Jan 2013 22:19:12 +0000 (22:19 +0000)]
Add -Wno-nested-anon-types to -pedantic builds of LLVM. This Clang warning
catches uses of an extremely minor and widely-available C++ extension (which
every C++ compiler I could find supports, but EDG and Clang reject in strict
mode).

The diagnosed code pattern looks like this:

struct X {
  union {
    struct {
      int a;
      int b;
    } S;
  };
};

llvm-svn: 174103

11 years ago[lit] Add a test for internal shell execution behaviors.
Daniel Dunbar [Thu, 31 Jan 2013 22:15:20 +0000 (22:15 +0000)]
[lit] Add a test for internal shell execution behaviors.

llvm-svn: 174102

11 years ago[lit] Change to raise InternalShellError for all command execution issues.
Daniel Dunbar [Thu, 31 Jan 2013 22:15:15 +0000 (22:15 +0000)]
[lit] Change to raise InternalShellError for all command execution issues.

llvm-svn: 174101

11 years agoDocument another instsimplify assumption.
Dan Gohman [Thu, 31 Jan 2013 22:13:00 +0000 (22:13 +0000)]
Document another instsimplify assumption.

llvm-svn: 174100

11 years agoR600: Fold clamp, neg, abs
Tom Stellard [Thu, 31 Jan 2013 22:11:54 +0000 (22:11 +0000)]
R600: Fold clamp, neg, abs

Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174099

11 years agoR600: Consider bitcast when folding const_address node.
Tom Stellard [Thu, 31 Jan 2013 22:11:53 +0000 (22:11 +0000)]
R600: Consider bitcast when folding const_address node.

Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174098

11 years agoR600: Make store_dummy intrinsic more general by passing export type
Tom Stellard [Thu, 31 Jan 2013 22:11:46 +0000 (22:11 +0000)]
R600: Make store_dummy intrinsic more general by passing export type

Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174097

11 years ago[analyzer] Don't track autorelease pools created by +new.
Jordan Rose [Thu, 31 Jan 2013 22:06:02 +0000 (22:06 +0000)]
[analyzer] Don't track autorelease pools created by +new.

This matches our behavior for autorelease pools created by +alloc. Some
people like to create autorelease pools in one method and release them
somewhere else.

If you want safe autorelease pool semantics, use the new ARC-compatible
syntax: @autoreleasepool { ... }

<rdar://problem/13121353>

llvm-svn: 174096

11 years agoAdd "thread return -x" to unwind the innermost user called expression (if you happen...
Jim Ingham [Thu, 31 Jan 2013 21:46:01 +0000 (21:46 +0000)]
Add "thread return -x" to unwind the innermost user called expression (if you happen to have stopped in it due to a crash.)
Make the message when you hit an crash while evaluating an expression a little clearer, and mention "thread return -x".

rdar://problem/13110464

llvm-svn: 174095

11 years agoRemove unused variable, which should have been removed with r174083.
Chad Rosier [Thu, 31 Jan 2013 21:23:44 +0000 (21:23 +0000)]
Remove unused variable, which should have been removed with r174083.

llvm-svn: 174094

11 years agoLinker: correctly link in dbg.declare
Manman Ren [Thu, 31 Jan 2013 21:19:18 +0000 (21:19 +0000)]
Linker: correctly link in dbg.declare

This is a re-worked version of r174048.
Given source IR:
call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !14), !dbg !15
we used to generate
call void @llvm.dbg.declare(metadata !27, metadata !28), !dbg !29
!27 = metadata !{null}

With this patch, we will correctly generate
call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !27), !dbg !28

Looking up %argc.addr in ValueMap will return null, since %argc.addr is already
correctly set up, we can use identity mapping.

rdar://problem/13089880

llvm-svn: 174093

11 years ago[ELF][x86-64] Improve unknown relocation message.
Michael J. Spencer [Thu, 31 Jan 2013 21:00:57 +0000 (21:00 +0000)]
[ELF][x86-64] Improve unknown relocation message.

llvm-svn: 174092

11 years ago[ELF] Create atoms for progbits sections with no symbols but still have content.
Michael J. Spencer [Thu, 31 Jan 2013 21:00:42 +0000 (21:00 +0000)]
[ELF] Create atoms for progbits sections with no symbols but still have content.

llvm-svn: 174091

11 years agoAdd support for emitting a string attribute.
Bill Wendling [Thu, 31 Jan 2013 20:59:05 +0000 (20:59 +0000)]
Add support for emitting a string attribute.

Attributes that are strings are typically target-dependent attributes. They are
of this form in the IR:

   "attr"
   "attr" = "val"

llvm-svn: 174090

11 years ago[lit] Fix bug where InternalShellError messages were discarded.
Daniel Dunbar [Thu, 31 Jan 2013 20:58:16 +0000 (20:58 +0000)]
[lit] Fix bug where InternalShellError messages were discarded.
 - Also, change the exit code to match 'sh'.

llvm-svn: 174089

11 years agoAdd braces, so my head doesn't explode.
Chad Rosier [Thu, 31 Jan 2013 20:57:50 +0000 (20:57 +0000)]
Add braces, so my head doesn't explode.

llvm-svn: 174088

11 years ago[lit] Fix a shell parsing bug with ';' not separated by whitespace.
Daniel Dunbar [Thu, 31 Jan 2013 20:51:17 +0000 (20:51 +0000)]
[lit] Fix a shell parsing bug with ';' not separated by whitespace.
 - Testing finds bugs, who knew.

llvm-svn: 174087

11 years agoUpdate AArch64 backend to changed eliminateFrameIndex interface.
Tim Northover [Thu, 31 Jan 2013 20:46:53 +0000 (20:46 +0000)]
Update AArch64 backend to changed eliminateFrameIndex interface.

llvm-svn: 174086

11 years agoWhen lowering memcpys to loads and stores, make sure we don't promote alignments
Lang Hames [Thu, 31 Jan 2013 20:23:43 +0000 (20:23 +0000)]
When lowering memcpys to loads and stores, make sure we don't promote alignments
past the natural stack alignment.

llvm-svn: 174085

11 years ago[Dwarf] early exit to avoid creating dangling DIEs
Manman Ren [Thu, 31 Jan 2013 20:05:14 +0000 (20:05 +0000)]
[Dwarf] early exit to avoid creating dangling DIEs

We used to create children DIEs for a scope, then check whether ScopeDIE is
null. If ScopeDIE is null, the children DIEs will be dangling. Other DIEs can
link to those dangling DIEs, which are not emitted at all, causing dwarf error.

The current testing case is 4k lines, from MultiSource/BenchMark/McCat/09-vor.

rdar://problem/13071959

llvm-svn: 174084

11 years ago[PEI] Pass the frame index operand number to the eliminateFrameIndex function.
Chad Rosier [Thu, 31 Jan 2013 20:02:54 +0000 (20:02 +0000)]
[PEI] Pass the frame index operand number to the eliminateFrameIndex function.
Each target implementation was needlessly recomputing the index.
Part of rdar://13076458

llvm-svn: 174083

11 years agoChange the default behavior for unwinding and breakpoints when running expressions.
Jim Ingham [Thu, 31 Jan 2013 19:48:57 +0000 (19:48 +0000)]
Change the default behavior for unwinding and breakpoints when running expressions.

<rdar://problem/13121442>

llvm-svn: 174082

11 years agoLexer: Don't warn about Unicode in preprocessor directives.
Jordan Rose [Thu, 31 Jan 2013 19:48:48 +0000 (19:48 +0000)]
Lexer: Don't warn about Unicode in preprocessor directives.

This allows people to use Unicode in their #pragma mark and in macros
that exist only to be string-ized.

<rdar://problem/13107323&13121362>

llvm-svn: 174081

11 years agointerpreter: Fix errant fallthrough.
Jim Grosbach [Thu, 31 Jan 2013 19:46:59 +0000 (19:46 +0000)]
interpreter: Fix errant fallthrough.

llvm-svn: 174080

11 years agoObject: Fix errant fallthrough.
Jim Grosbach [Thu, 31 Jan 2013 19:46:57 +0000 (19:46 +0000)]
Object: Fix errant fallthrough.

llvm-svn: 174079

11 years agoRuntimeDyld: Fix errant fallthrough.
Jim Grosbach [Thu, 31 Jan 2013 19:46:28 +0000 (19:46 +0000)]
RuntimeDyld: Fix errant fallthrough.

llvm-svn: 174078

11 years agoPreprocessor: initialize member introduced in r173881.
Jordan Rose [Thu, 31 Jan 2013 19:26:01 +0000 (19:26 +0000)]
Preprocessor: initialize member introduced in r173881.

Compilation always sets this explicitly, but creating a preprocessor
manually should still put the 'IsPreprocessedOutput' flag in a valid state.

llvm-svn: 174077

11 years agoReverted unintendedly-committed file.
Alexander Kornienko [Thu, 31 Jan 2013 19:05:31 +0000 (19:05 +0000)]
Reverted unintendedly-committed file.

llvm-svn: 174076

11 years agoMicro-change: moved a brace for better readability
Alexander Kornienko [Thu, 31 Jan 2013 19:03:16 +0000 (19:03 +0000)]
Micro-change: moved a brace for better readability

llvm-svn: 174075

11 years agoMaking sure a Pythonless build of LLDB works by #ifdef-ing out formatters code.
Enrico Granata [Thu, 31 Jan 2013 18:24:22 +0000 (18:24 +0000)]
Making sure a Pythonless build of LLDB works by #ifdef-ing out formatters code.

llvm-svn: 174074

11 years agoTurn off missing field initializer warnings for gcc
Edwin Vane [Thu, 31 Jan 2013 18:05:54 +0000 (18:05 +0000)]
Turn off missing field initializer warnings for gcc

gcc produces false positives for empty braces so turning the warning off.
Instead, turning the warning on for clang so proper warnings aren't missed.

Reviewers: dblaikie, chandlerc

llvm-svn: 174073

11 years ago[lit] Add a test for the various ShTest format features.
Daniel Dunbar [Thu, 31 Jan 2013 18:05:01 +0000 (18:05 +0000)]
[lit] Add a test for the various ShTest format features.

llvm-svn: 174072

11 years ago[lit] TestRunner: Eliminate failDueToStderr argument, which is now unused.
Daniel Dunbar [Thu, 31 Jan 2013 18:04:45 +0000 (18:04 +0000)]
[lit] TestRunner: Eliminate failDueToStderr argument, which is now unused.

llvm-svn: 174071

11 years ago[lit] Delete the now-unused SyntaxCheckTest format.
Daniel Dunbar [Thu, 31 Jan 2013 18:04:38 +0000 (18:04 +0000)]
[lit] Delete the now-unused SyntaxCheckTest format.
 - Also, kill the pointless LitFormats module.

llvm-svn: 174070

11 years agoRevert "[analyzer] Model trivial copy/move ctors with an aggregate bind."
Jordan Rose [Thu, 31 Jan 2013 18:04:03 +0000 (18:04 +0000)]
Revert "[analyzer] Model trivial copy/move ctors with an aggregate bind."

It's causing hangs on our internal analyzer buildbot. Will restore after
investigating.

This reverts r173951 / baa7ca1142990e1ad6d4e9d2c73adb749ff50789.

llvm-svn: 174069

11 years agoClarify intent.
Jakob Stoklund Olesen [Thu, 31 Jan 2013 17:56:23 +0000 (17:56 +0000)]
Clarify intent.

llvm-svn: 174068

11 years ago[MC] bundle alignment: prevent padding instructions from crossing bundle boundaries
Derek Schuff [Thu, 31 Jan 2013 17:00:03 +0000 (17:00 +0000)]
[MC] bundle alignment: prevent padding instructions from crossing bundle boundaries

llvm-svn: 174067

11 years agoadd support for assigning virtual addresses to TDATA/TBSS sections
Shankar Easwaran [Thu, 31 Jan 2013 16:04:47 +0000 (16:04 +0000)]
add support for assigning virtual addresses to TDATA/TBSS sections

llvm-svn: 174065

11 years agoclang/test/Index/skip-parsed-bodies/compile_commands.json: Mark it as XFAIL:mingw32...
NAKAMURA Takumi [Thu, 31 Jan 2013 16:01:13 +0000 (16:01 +0000)]
clang/test/Index/skip-parsed-bodies/compile_commands.json: Mark it as XFAIL:mingw32, for now.

llvm-svn: 174064

11 years agoNever break inside something that was a preprocessor directive.
Manuel Klimek [Thu, 31 Jan 2013 15:58:48 +0000 (15:58 +0000)]
Never break inside something that was a preprocessor directive.

Just put it in one unwrapped line and let the formatter handle it.

llvm-svn: 174063

11 years agoSeveral improvements to the formatting of static initializers.
Daniel Jasper [Thu, 31 Jan 2013 14:59:26 +0000 (14:59 +0000)]
Several improvements to the formatting of static initializers.

1. Never avoid bin packing in static initializers as this can
   lead to terrible results.
2. If an element has to be broken over multiple lines, break after
   the following comma.

This should be a step forward, but there are still many cases
especially with nested static initializers that we handle badly.
More patches will follow.

llvm-svn: 174061

11 years agoAttempt to fix Windows build breakage.
Evgeniy Stepanov [Thu, 31 Jan 2013 14:27:38 +0000 (14:27 +0000)]
Attempt to fix Windows build breakage.

llvm-svn: 174060

11 years ago[sanitizer] make the error messages from sanitizer_common contain the actual tool...
Kostya Serebryany [Thu, 31 Jan 2013 14:11:21 +0000 (14:11 +0000)]
[sanitizer] make the error messages from sanitizer_common contain the actual tool name

llvm-svn: 174059

11 years ago[ASan] Split ASan interface header into private and public parts. Add a test that...
Alexey Samsonov [Thu, 31 Jan 2013 13:46:14 +0000 (13:46 +0000)]
[ASan] Split ASan interface header into private and public parts. Add a test that makes sure users can include interface header

llvm-svn: 174058

11 years agoMove commonly useful code for AST testing into MatchVerfier.h.
Manuel Klimek [Thu, 31 Jan 2013 13:10:40 +0000 (13:10 +0000)]
Move commonly useful code for AST testing into MatchVerfier.h.

llvm-svn: 174057

11 years agoAdd myself as code owner of AArch64 backend.
Tim Northover [Thu, 31 Jan 2013 12:51:16 +0000 (12:51 +0000)]
Add myself as code owner of AArch64 backend.

llvm-svn: 174056

11 years agoAdd support for AArch64 target.
Tim Northover [Thu, 31 Jan 2013 12:13:10 +0000 (12:13 +0000)]
Add support for AArch64 target.

In cooperation with the LLVM patch, this should implement all scalar front-end
parts of the C and C++ ABIs for AArch64.

This patch excludes the NEON support also reviewed due to an outbreak of
batshit insanity in our legal department. That will be committed soon bringing
the changes to precisely what has been approved.

Further reviews would be gratefully received.

llvm-svn: 174055

11 years agoAdd AArch64 as an experimental target.
Tim Northover [Thu, 31 Jan 2013 12:12:40 +0000 (12:12 +0000)]
Add AArch64 as an experimental target.

This patch adds support for AArch64 (ARM's 64-bit architecture) to
LLVM in the "experimental" category. Currently, it won't be built
unless requested explicitly.

This initial commit should have support for:
    + Assembly of all scalar (i.e. non-NEON, non-Crypto) instructions
      (except the late addition CRC instructions).
    + CodeGen features required for C++03 and C99.
    + Compilation for the "small" memory model: code+static data <
      4GB.
    + Absolute and position-independent code.
    + GNU-style (i.e. "__thread") TLS.
    + Debugging information.

The principal omission, currently, is performance tuning.

This patch excludes the NEON support also reviewed due to an outbreak of
batshit insanity in our legal department. That will be committed soon bringing
the changes to precisely what has been approved.

Further reviews would be gratefully received.

llvm-svn: 174054

11 years agoRevert r174043 and tweak the comment wording so I'm (hopefully) not confused by it...
Richard Smith [Thu, 31 Jan 2013 11:30:17 +0000 (11:30 +0000)]
Revert r174043 and tweak the comment wording so I'm (hopefully) not confused by it again!

llvm-svn: 174053

11 years agoMade the min-trip-count-switch test X86-specific to avoid
Pekka Jaaskelainen [Thu, 31 Jan 2013 10:33:22 +0000 (10:33 +0000)]
Made the min-trip-count-switch test X86-specific to avoid
breakage with builds without X86-support.

llvm-svn: 174052

11 years agoAnnotate BumpPtrAllocator for MemorySanitizer.
Evgeniy Stepanov [Thu, 31 Jan 2013 09:58:59 +0000 (09:58 +0000)]
Annotate BumpPtrAllocator for MemorySanitizer.

This change adds MemorySanitizer annotations to BumpPtrAllocator to
improve report quality.

llvm-svn: 174051

11 years agoAdded outer template parameter lists to friend type AST nodes.
Enea Zaffanella [Thu, 31 Jan 2013 09:54:08 +0000 (09:54 +0000)]
Added outer template parameter lists to friend type AST nodes.

llvm-svn: 174050

11 years ago[msan] Run more optimizations after MemorySanitizer pass.
Evgeniy Stepanov [Thu, 31 Jan 2013 09:53:29 +0000 (09:53 +0000)]
[msan] Run more optimizations after MemorySanitizer pass.

MSan instrumentation is driven by the original code. We take every
incoming instruction and emit another instruction (or ten) next to
it, operating on the shadow values (but sometimes on the real values,
too). Two programs in one, essentially. There can be any kinds of
redundancies in the second one, so we just run whatever is normally
run at -O2, and then exclude some passes that do not help much with
benchmarks.

llvm-svn: 174049

11 years agoRevert r173946. This breaks compilation of googletest with Clang
Alexey Samsonov [Thu, 31 Jan 2013 08:02:11 +0000 (08:02 +0000)]
Revert r173946. This breaks compilation of googletest with Clang

llvm-svn: 174048

11 years agotsan: switch to explicit thread contexts in Go (instead of monotonic goroutine ids)
Dmitry Vyukov [Thu, 31 Jan 2013 07:48:43 +0000 (07:48 +0000)]
tsan: switch to explicit thread contexts in Go (instead of monotonic goroutine ids)

llvm-svn: 174047

11 years agotsan: do not check for intersecting memory accesses in Go (all accesses are 1 byte)
Dmitry Vyukov [Thu, 31 Jan 2013 07:47:58 +0000 (07:47 +0000)]
tsan: do not check for intersecting memory accesses in Go (all accesses are 1 byte)

llvm-svn: 174046

11 years agoAdded the ability to search segments for data. Currently __TEXT, __LINKEDIT and __PAG...
Greg Clayton [Thu, 31 Jan 2013 06:38:09 +0000 (06:38 +0000)]
Added the ability to search segments for data. Currently __TEXT, __LINKEDIT and __PAGEZERO are excluded.

Added many more cleanups to the output.

llvm-svn: 174045

11 years agoRemove the Attribute::hasAttributes() function.
Bill Wendling [Thu, 31 Jan 2013 06:22:35 +0000 (06:22 +0000)]
Remove the Attribute::hasAttributes() function.

That function doesn't make sense anymore because there's only one attribute per
Attribute object now.

llvm-svn: 174044

11 years agoRemove incorrect warning signs from QualType::getUnqualifiedType(). These
Richard Smith [Thu, 31 Jan 2013 06:13:11 +0000 (06:13 +0000)]
Remove incorrect warning signs from QualType::getUnqualifiedType(). These
statements were only true for 65 CLs after they were introduced two years ago.

llvm-svn: 174043

11 years agoWhen we're emitting a constructor or destructor call from a delegating
Douglas Gregor [Thu, 31 Jan 2013 05:50:40 +0000 (05:50 +0000)]
When we're emitting a constructor or destructor call from a delegating
constructor, retrieve our VTT parameter directly. Fixes PR14588 /
<rdar://problem/12867962>.

llvm-svn: 174042

11 years agoFixed a mistake in my previous commit where I changed the wording slightly and forgot...
Michael Gottesman [Thu, 31 Jan 2013 05:48:48 +0000 (05:48 +0000)]
Fixed a mistake in my previous commit where I changed the wording slightly and forgot to undo the change after changing my mind and deciding to only commit the style changes.

llvm-svn: 174041

11 years agoFormatting Fix. Changed " to `` around the word 'constant' in the Lang Ref
Michael Gottesman [Thu, 31 Jan 2013 05:44:04 +0000 (05:44 +0000)]
Formatting Fix. Changed " to `` around the word 'constant' in the Lang Ref
section Global Variable so that the style matches the other keywords in
said section.

llvm-svn: 174040

11 years agoImprove 'failed template argument deduction' diagnostic for the case where we
Richard Smith [Thu, 31 Jan 2013 05:19:49 +0000 (05:19 +0000)]
Improve 'failed template argument deduction' diagnostic for the case where we
have a direct mismatch between some component of the template and some
component of the argument. The diagnostic now says what the mismatch was, but
doesn't yet say which part of the template doesn't match.

llvm-svn: 174039

11 years agoWhen code completing in a statement, parenthesized expression, or
Douglas Gregor [Thu, 31 Jan 2013 05:03:46 +0000 (05:03 +0000)]
When code completing in a statement, parenthesized expression, or
Objective-C message receiver, the user is as likely to want to write a
type name as any other declaration, so give types the same priority as
other declarations. Fixes <rdar://problem/12480600>.

llvm-svn: 174038

11 years agoAllow the computation of the base priority for a declaration code completion result...
Douglas Gregor [Thu, 31 Jan 2013 04:52:16 +0000 (04:52 +0000)]
Allow the computation of the base priority for a declaration code completion result to consider the completion context

llvm-svn: 174037

11 years agoReplace "failed template argument deduction" diagnostic with something useful
Richard Smith [Thu, 31 Jan 2013 04:03:12 +0000 (04:03 +0000)]
Replace "failed template argument deduction" diagnostic with something useful
in the one case where we've already factored out a reason code.

llvm-svn: 174036

11 years agoRevert r174026, "Remove Attribute::hasAttributes() and make Attribute::hasAttribute...
NAKAMURA Takumi [Thu, 31 Jan 2013 03:47:28 +0000 (03:47 +0000)]
Revert r174026, "Remove Attribute::hasAttributes() and make Attribute::hasAttribute() private."

It broke many hosts to crash.

llvm-svn: 174035

11 years agoRemove elements from Sema.UndefinedInternals as functions are defined. Also
Nick Lewycky [Thu, 31 Jan 2013 03:23:57 +0000 (03:23 +0000)]
Remove elements from Sema.UndefinedInternals as functions are defined. Also
filter the elements before emitting them into a PCH. No user-visible
functionality change, except that PCH files may be smaller?

llvm-svn: 174034

11 years agoFix grammar in comment.
Nick Lewycky [Thu, 31 Jan 2013 03:15:20 +0000 (03:15 +0000)]
Fix grammar in comment.

llvm-svn: 174033

11 years agoClarify the diagnostic for -Wnested-anon-types.
Richard Smith [Thu, 31 Jan 2013 03:11:12 +0000 (03:11 +0000)]
Clarify the diagnostic for -Wnested-anon-types.

llvm-svn: 174032