platform/upstream/llvm.git
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

11 years ago[analyzer] If a lazy binding is undefined, pretend that it's unknown instead.
Jordan Rose [Thu, 31 Jan 2013 02:57:06 +0000 (02:57 +0000)]
[analyzer] If a lazy binding is undefined, pretend that it's unknown instead.

This is a hack to work around the fact that we don't track extents for our
default bindings:

  CGPoint p;
  p.x = 0.0;
  p.y = 0.0;
  rectParam.origin = p;
  use(rectParam.size); // warning: uninitialized value in rectParam.size.width

In this case, the default binding for 'p' gets copied into 'rectParam',
because the 'origin' field is at offset 0 within CGRect. From then on,
rectParam's old default binding (in this case a symbol) is lost.

This patch silences the warning by pretending that lazy bindings are never
made from uninitialized memory, but not only is that not true, the original
default binding is still getting overwritten (see FIXME test cases).
The long-term solution is tracked in <rdar://problem/12701038>

PR14765 and <rdar://problem/12875012>

llvm-svn: 174031

11 years agoChange stripAndComputeConstantOffsets to accept a NULL DataLayout pointer
Dan Gohman [Thu, 31 Jan 2013 02:50:36 +0000 (02:50 +0000)]
Change stripAndComputeConstantOffsets to accept a NULL DataLayout pointer
as well.

llvm-svn: 174030

11 years agoWhen comparing two template template arguments in the template differ, consider
Richard Trieu [Thu, 31 Jan 2013 02:47:46 +0000 (02:47 +0000)]
When comparing two template template arguments in the template differ, consider
them the same if they are actually the same; having the same name isn't enough.

Similar to r174013, template template arguments were also mistakenly considered
the same when they had the same name but were in different namespaces.
In addition, when printing template template arguments, use the qualified name
if the regular name is the same.

llvm-svn: 174029

11 years agoAdd a comment.
Dan Gohman [Thu, 31 Jan 2013 02:45:26 +0000 (02:45 +0000)]
Add a comment.

llvm-svn: 174028

11 years agoMove isKnownNonNull out of AliasAnalysis.h and into ValueTracking.cpp since
Dan Gohman [Thu, 31 Jan 2013 02:40:59 +0000 (02:40 +0000)]
Move isKnownNonNull out of AliasAnalysis.h and into ValueTracking.cpp since
it isn't really an AliasAnalysis concept, and ValueTracking has similar things
that it could plausibly share code with some day.

llvm-svn: 174027

11 years agoRemove Attribute::hasAttributes() and make Attribute::hasAttribute() private.
Bill Wendling [Thu, 31 Jan 2013 02:18:19 +0000 (02:18 +0000)]
Remove Attribute::hasAttributes() and make Attribute::hasAttribute() private.

The Attribute::hasAttributes() is kind of meaningless since an Attribute can
have only one attribute. And we would rather people use the 'operator=='
instead of Attribute::hasAttribute().

llvm-svn: 174026

11 years agoFix -Wcovered-switch-default and -Wunused-private-field warnings.
Richard Smith [Thu, 31 Jan 2013 02:04:38 +0000 (02:04 +0000)]
Fix -Wcovered-switch-default and -Wunused-private-field warnings.

llvm-svn: 174025

11 years agoChange GetPointerBaseWithConstantOffset's DataLayout argument from a
Dan Gohman [Thu, 31 Jan 2013 02:00:45 +0000 (02:00 +0000)]
Change GetPointerBaseWithConstantOffset's DataLayout argument from a
reference to a pointer, so that it can handle the case where DataLayout
is not available and behave conservatively.

llvm-svn: 174024

11 years agoMake the AttrBuilder creation method of Attribute private so that people won't use it.
Bill Wendling [Thu, 31 Jan 2013 01:51:27 +0000 (01:51 +0000)]
Make the AttrBuilder creation method of Attribute private so that people won't use it.

llvm-svn: 174023

11 years agoAdd indents to AST dumping and removed parenthesis from AST nodes.
Richard Trieu [Thu, 31 Jan 2013 01:44:26 +0000 (01:44 +0000)]
Add indents to AST dumping and removed parenthesis from AST nodes.
Indents were given the color blue when outputting with color.
AST dumping now looks like this:

Node
|-Node
| `-Node
`-Node
  `-Node

Compared to the previous:

(Node
  (Node
    (Node))
  (Node
    (Node)))

llvm-svn: 174022

11 years agobuild: @ENABLE_THREADS@ => @LLVM_ENABLE_THREADS@
Saleem Abdulrasool [Thu, 31 Jan 2013 01:34:59 +0000 (01:34 +0000)]
build: @ENABLE_THREADS@ => @LLVM_ENABLE_THREADS@

Makefile.config does not have the value for ENABLE_THREADS substituted as the
variable is called LLVM_ENABLE_THREADS within configure.ac.  This was pointed
out by zygoloid over IRC.

llvm-svn: 174021

11 years agoFix ODR-use of a MemberExpr to check before marking a pure function used. Remove
Nick Lewycky [Thu, 31 Jan 2013 01:34:31 +0000 (01:34 +0000)]
Fix ODR-use of a MemberExpr to check before marking a pure function used. Remove
a workaround for this bug from the -Wundefined-internals warning.

llvm-svn: 174020

11 years ago[lit] Move unittest adaptor code into discovery module.
Daniel Dunbar [Thu, 31 Jan 2013 01:23:39 +0000 (01:23 +0000)]
[lit] Move unittest adaptor code into discovery module.
 - Also, add a test for it.

llvm-svn: 174019

11 years ago[lit] Run the ShUtil tests as part of the test suite.
Daniel Dunbar [Thu, 31 Jan 2013 01:23:26 +0000 (01:23 +0000)]
[lit] Run the ShUtil tests as part of the test suite.

llvm-svn: 174018

11 years ago[lit] Set parallel mode for coverage tests.
Daniel Dunbar [Thu, 31 Jan 2013 01:23:18 +0000 (01:23 +0000)]
[lit] Set parallel mode for coverage tests.

llvm-svn: 174017

11 years ago[analyzer] Fix a bug in region store that lead to undefined value false
Anna Zaks [Thu, 31 Jan 2013 01:19:52 +0000 (01:19 +0000)]
[analyzer] Fix a bug in region store that lead to undefined value false
positives.

The includeSuffix was only set on the first iteration through the
function, resulting in invalid regions being produced by getLazyBinding
(ex: zoomRegion.y).

llvm-svn: 174016

11 years agoSometimes ld is just ld.
Matt Beaumont-Gay [Thu, 31 Jan 2013 01:15:55 +0000 (01:15 +0000)]
Sometimes ld is just ld.

Don't expect a character between the double-quotes and 'ld'.

llvm-svn: 174015

11 years ago[lit] Move discovery code into its own module.
Daniel Dunbar [Thu, 31 Jan 2013 01:14:01 +0000 (01:14 +0000)]
[lit] Move discovery code into its own module.

llvm-svn: 174014

11 years agoWhen comparing two templates in the template differ, consider them the
Douglas Gregor [Thu, 31 Jan 2013 01:08:35 +0000 (01:08 +0000)]
When comparing two templates in the template differ, consider them the
same if they are actually the same; having the same name isn't
enough. Fixes <rdar://problem/12931988>.

llvm-svn: 174013

11 years agoRevert for now:
Bill Wendling [Thu, 31 Jan 2013 01:04:51 +0000 (01:04 +0000)]
Revert for now:

--- Reverse-merging r174010 into '.':
U    include/llvm/IR/Attributes.h
U    lib/IR/Verifier.cpp
U    lib/IR/Attributes.cpp

llvm-svn: 174012

11 years agoFilecheckized 2x tests in SimplifyCFG and removed their date prefix to fit with curre...
Michael Gottesman [Thu, 31 Jan 2013 01:04:23 +0000 (01:04 +0000)]
Filecheckized 2x tests in SimplifyCFG and removed their date prefix to fit with current llvm style for test names.

llvm-svn: 174011

11 years agoRemove the AttrBuilder version of the Attribute::get function.
Bill Wendling [Thu, 31 Jan 2013 00:53:21 +0000 (00:53 +0000)]
Remove the AttrBuilder version of the Attribute::get function.

The AttrBuilder is there to build up multiple attributes. The Attribute class
represents only one attribute at a time. So remove this unnecessary builder
creator method.

llvm-svn: 174010

11 years agoWhitespace.
Eric Christopher [Thu, 31 Jan 2013 00:50:48 +0000 (00:50 +0000)]
Whitespace.

llvm-svn: 174009

11 years agoCheck and allow floating point registers to select the size of the
Eric Christopher [Thu, 31 Jan 2013 00:50:46 +0000 (00:50 +0000)]
Check and allow floating point registers to select the size of the
register for inline asm. This conforms to how gcc allows for effective
casting of inputs into gprs (fprs is already handled).

llvm-svn: 174008

11 years agoLangRef: Add a Rationale for volatile rules.
Andrew Trick [Thu, 31 Jan 2013 00:49:39 +0000 (00:49 +0000)]
LangRef: Add a Rationale for volatile rules.

llvm-svn: 174007

11 years agoReplace some more greps with FileChecks in tests
Eli Bendersky [Thu, 31 Jan 2013 00:44:12 +0000 (00:44 +0000)]
Replace some more greps with FileChecks in tests

llvm-svn: 174006

11 years agoMinor code simplification.
Dan Gohman [Thu, 31 Jan 2013 00:32:11 +0000 (00:32 +0000)]
Minor code simplification.

llvm-svn: 174005

11 years agoMake sure that the Attribute object represents one attribute only.
Bill Wendling [Thu, 31 Jan 2013 00:30:05 +0000 (00:30 +0000)]
Make sure that the Attribute object represents one attribute only.

Several places were still treating the Attribute object as respresenting
multiple attributes. Those places now use the AttributeSet to represent
multiple attributes.

llvm-svn: 174004

11 years agoMake sure that the Attribute object represents one attribute only.
Bill Wendling [Thu, 31 Jan 2013 00:29:54 +0000 (00:29 +0000)]
Make sure that the Attribute object represents one attribute only.

Several places were still treating the Attribute object as respresenting
multiple attributes. Those places now use the AttributeSet to represent
multiple attributes.

llvm-svn: 174003

11 years ago[lit] Add a MANIFEST file and a script for sanity checking the source dist.
Daniel Dunbar [Thu, 31 Jan 2013 00:21:59 +0000 (00:21 +0000)]
[lit] Add a MANIFEST file and a script for sanity checking the source dist.

llvm-svn: 174002

11 years ago[lit] Add a basic discovery test.
Daniel Dunbar [Thu, 31 Jan 2013 00:21:51 +0000 (00:21 +0000)]
[lit] Add a basic discovery test.

llvm-svn: 174001

11 years ago[lit] Add a script for checking test coverage.
Daniel Dunbar [Thu, 31 Jan 2013 00:21:44 +0000 (00:21 +0000)]
[lit] Add a script for checking test coverage.

llvm-svn: 174000

11 years ago[lit] Add a test suite for lit itself.
Daniel Dunbar [Thu, 31 Jan 2013 00:21:39 +0000 (00:21 +0000)]
[lit] Add a test suite for lit itself.

llvm-svn: 173999

11 years agostripAndComputeConstantOffsets is only called on pointers; check this
Dan Gohman [Thu, 31 Jan 2013 00:12:20 +0000 (00:12 +0000)]
stripAndComputeConstantOffsets is only called on pointers; check this
with an assert instead of failing and requiring callers to check for failure.

llvm-svn: 173998

11 years agoRewrite this test properly with a FileCheck instead of greps
Eli Bendersky [Thu, 31 Jan 2013 00:11:52 +0000 (00:11 +0000)]
Rewrite this test properly with a FileCheck instead of greps

llvm-svn: 173997

11 years agoFix unused variable warnings in -asserts build
Matt Beaumont-Gay [Thu, 31 Jan 2013 00:08:03 +0000 (00:08 +0000)]
Fix unused variable warnings in -asserts build

llvm-svn: 173996

11 years agoFix ConstantFold's folding of icmp instructions to recognize that,
Dan Gohman [Thu, 31 Jan 2013 00:01:45 +0000 (00:01 +0000)]
Fix ConstantFold's folding of icmp instructions to recognize that,
for example, a one-past-the-end pointer from one global variable may
be equal to the base pointer of another global variable.

llvm-svn: 173995

11 years agoAdded a unit test for r173983 that verifies that Target.isiOS() works correctly.
Michael Gottesman [Wed, 30 Jan 2013 23:48:13 +0000 (23:48 +0000)]
Added a unit test for r173983 that verifies that Target.isiOS() works correctly.

As a bonus I put in some extra checks to make sure that we are identifying the
machine word of various Mac OS X/iOS targets appropriately.

llvm-svn: 173994

11 years agoPPC QPX requires a 32-byte aligned stack
Hal Finkel [Wed, 30 Jan 2013 23:43:27 +0000 (23:43 +0000)]
PPC QPX requires a 32-byte aligned stack

On systems which support the QPX vector instructions, the stack must be
32-byte aligned.

llvm-svn: 173993

11 years agoRemove addRetAttributes and addFnAttributes, which aren't useful abstractions.
Bill Wendling [Wed, 30 Jan 2013 23:40:31 +0000 (23:40 +0000)]
Remove addRetAttributes and addFnAttributes, which aren't useful abstractions.

llvm-svn: 173992

11 years agoReinstate r173952, this time limiting it to exactly the form
Douglas Gregor [Wed, 30 Jan 2013 23:10:17 +0000 (23:10 +0000)]
Reinstate r173952, this time limiting it to exactly the form

  #define X X

for which there is no point warning, ever.

llvm-svn: 173991

11 years agoConvert typeIncompatible to return an AttributeSet.
Bill Wendling [Wed, 30 Jan 2013 23:07:40 +0000 (23:07 +0000)]
Convert typeIncompatible to return an AttributeSet.

There are still places which treat the Attribute object as a collection of
attributes. I'm systematically removing them.

llvm-svn: 173990

11 years agoexpressions + C++11 lambdas == cooooool!!!
Greg Clayton [Wed, 30 Jan 2013 22:57:34 +0000 (22:57 +0000)]
expressions + C++11 lambdas == cooooool!!!

C++11 lambdas that don't capture anything can be used as static callback functions!

Heavily modified this python module to be able to not require a dylib in order to traverse the heap allocations.

Re-implemented the ptr_refs, objc_refs, malloc_info and cstr_refs to use complex expressions that use lambdas to do all static callback function work.

llvm-svn: 173989

11 years agoForgot the test case before.
Evan Cheng [Wed, 30 Jan 2013 22:57:00 +0000 (22:57 +0000)]
Forgot the test case before.

llvm-svn: 173988

11 years agoRestrict sin/cos optimization to 64-bit only for now. 32-bit is a bit messy and less...
Evan Cheng [Wed, 30 Jan 2013 22:56:35 +0000 (22:56 +0000)]
Restrict sin/cos optimization to 64-bit only for now. 32-bit is a bit messy and less critical.

llvm-svn: 173987

11 years agoDoxygenified some comments in IRBuilder.h.
Michael Gottesman [Wed, 30 Jan 2013 22:56:31 +0000 (22:56 +0000)]
Doxygenified some comments in IRBuilder.h.

llvm-svn: 173986

11 years agoRemoved CreateFPExtOrFPTrunc for now until I have the time to get in my vector conver...
Michael Gottesman [Wed, 30 Jan 2013 22:53:21 +0000 (22:53 +0000)]
Removed CreateFPExtOrFPTrunc for now until I have the time to get in my vector convert patch.

What I thought was going to be a quick thing has extended out a little bit in
time *sigh*. So after some thought in order to not cruft up the tree I am
removing this for now since it is the right thing to do.

llvm-svn: 173985

11 years agoInitialize hasQPX in PPCSubtarget
Hal Finkel [Wed, 30 Jan 2013 22:43:44 +0000 (22:43 +0000)]
Initialize hasQPX in PPCSubtarget

This should have gone in with r173973.

llvm-svn: 173984

11 years agoEncapsulate testing that we have an iOS Triple in Triple.h in the method isiOS
Michael Gottesman [Wed, 30 Jan 2013 22:38:19 +0000 (22:38 +0000)]
Encapsulate testing that we have an iOS Triple in Triple.h in the method isiOS
so we follow the convention that all other platforms follow by having an is*
test method.

llvm-svn: 173983

11 years agoVerified that the plugin.dynamic-loader.darwin-kernel.scan-type
Jason Molenda [Wed, 30 Jan 2013 22:19:51 +0000 (22:19 +0000)]
Verified that the plugin.dynamic-loader.darwin-kernel.scan-type
setting is working correctly now; remove the #if 0's around its
use.

llvm-svn: 173982

11 years agoDiagnostics: Clarify name of line-length-limiting constant in r173976.
Jordan Rose [Wed, 30 Jan 2013 22:14:15 +0000 (22:14 +0000)]
Diagnostics: Clarify name of line-length-limiting constant in r173976.

Thanks, Sean.

llvm-svn: 173981

11 years agoChanged to static_cast, due to post-commit review.
Filipe Cabecinhas [Wed, 30 Jan 2013 22:03:24 +0000 (22:03 +0000)]
Changed to static_cast, due to post-commit review.

llvm-svn: 173980

11 years agoTableGen backends: use emitSourceFileHeader() to emit the warning about
Dmitri Gribenko [Wed, 30 Jan 2013 21:54:20 +0000 (21:54 +0000)]
TableGen backends: use emitSourceFileHeader() to emit the warning about
file contents being autogenerated

llvm-svn: 173979

11 years agoCast to remove the narrowing conversion error in c++11.
Filipe Cabecinhas [Wed, 30 Jan 2013 21:50:21 +0000 (21:50 +0000)]
Cast to remove the narrowing conversion error in c++11.

llvm-svn: 173978

11 years ago[build/clang_darwin] Fix the case reversal in r173465.
Daniel Dunbar [Wed, 30 Jan 2013 21:45:35 +0000 (21:45 +0000)]
[build/clang_darwin] Fix the case reversal in r173465.

 - I got confused by the double negative, the test succends on 10.6, in which
   case we *do* want to perform the filter-out.

llvm-svn: 173977

11 years agoDiagnostics: if a line is longer than 4096 characters, don't print it.
Jordan Rose [Wed, 30 Jan 2013 21:41:07 +0000 (21:41 +0000)]
Diagnostics: if a line is longer than 4096 characters, don't print it.

Specifically, don't print snippets, caret diagnostics, or ranges for
lines over 4096 characters. We copy the line around a few times in our
diagnostics machinery, and we have to print a caret line that's just as
long. This uses a lot of memory just to create a poor user experience as
we print out a line much too long for anyone to read...or spend extra
energy trying to fit it to -fmessage-length.

<rdar://problem/13106850>

llvm-svn: 173976

11 years agoRemove redundant code.
Bill Wendling [Wed, 30 Jan 2013 21:22:59 +0000 (21:22 +0000)]
Remove redundant code.

It was creating a new AttrBuilder when we could just fill in the AttrBuilder
we're building.

llvm-svn: 173975

11 years ago...in light of recent activity related to llvm.memcpy flags. I want to
Andrew Trick [Wed, 30 Jan 2013 21:19:35 +0000 (21:19 +0000)]
...in light of recent activity related to llvm.memcpy flags. I want to
prevent an llvm developer from mistakenly thinking that just because the
intrinsic has volatile flags that volatile operations can be converted
to or folded into them.

Platforms may rely on volatile loads and stores of natively supported
data width to be executed as single instruction. When compiling
C, this expectation likely holds for l-values of volatile primitive
types with native hardware support, but not necessarily for aggregate
types. The frontend upholds these expectations, which are not
specified in the IR.

llvm-svn: 173974

11 years agoAdd definitions for the PPC a2q core marked as having QPX available
Hal Finkel [Wed, 30 Jan 2013 21:17:42 +0000 (21:17 +0000)]
Add definitions for the PPC a2q core marked as having QPX available

This is the first commit of a large series which will add support for the
QPX vector instruction set to the PowerPC backend. This instruction set is
used on the IBM Blue Gene/Q supercomputers.

llvm-svn: 173973

11 years agoRemove a mention of TargetInstrDescriptor, which no longer exists in the code
Eli Bendersky [Wed, 30 Jan 2013 20:54:21 +0000 (20:54 +0000)]
Remove a mention of TargetInstrDescriptor, which no longer exists in the code

llvm-svn: 173971

11 years agoRevert "[preprocessor] Don't warn about "disabled expansion of recursive macro""
Argyrios Kyrtzidis [Wed, 30 Jan 2013 20:42:17 +0000 (20:42 +0000)]
Revert "[preprocessor] Don't warn about "disabled expansion of recursive macro""

This reverts commit r173952

llvm-svn: 173970

11 years ago[docs] Guide prospective TableGen backend writers.
Sean Silva [Wed, 30 Jan 2013 20:39:46 +0000 (20:39 +0000)]
[docs] Guide prospective TableGen backend writers.

Boilerplate is often the hardest part of getting started with these
kinds of things, so throw them a bone.

llvm-svn: 173969

11 years ago[ELF] Fix circular initialization bug.
Michael J. Spencer [Wed, 30 Jan 2013 20:36:56 +0000 (20:36 +0000)]
[ELF] Fix circular initialization bug.

llvm-svn: 173968

11 years ago[ELF] Use the target's LayoutHandler.
Michael J. Spencer [Wed, 30 Jan 2013 20:05:27 +0000 (20:05 +0000)]
[ELF] Use the target's LayoutHandler.

llvm-svn: 173966

11 years agoHandle passing non-Qualtypes to %diff better. Instead of asserting, fall back
Richard Trieu [Wed, 30 Jan 2013 20:04:31 +0000 (20:04 +0000)]
Handle passing non-Qualtypes to %diff better.  Instead of asserting, fall back
to printing the default case.  This is a fix for PR15023.

llvm-svn: 173965

11 years agoAdd OpenCL error that a kernel function must have void return type. Includes a test...
Tanya Lattner [Wed, 30 Jan 2013 19:48:52 +0000 (19:48 +0000)]
Add OpenCL error that a kernel function must have void return type. Includes a test case.

llvm-svn: 173963

11 years agoUse the number of 'slots' in the AttributeSetImpl being 0 to indicate that the Attrib...
Bill Wendling [Wed, 30 Jan 2013 19:39:21 +0000 (19:39 +0000)]
Use the number of 'slots' in the AttributeSetImpl being 0 to indicate that the AttributeSet is empty.

llvm-svn: 173962

11 years agoFix comment in test/Lexer/utf8-invalid.c for updates in r173959.
Jordan Rose [Wed, 30 Jan 2013 19:29:14 +0000 (19:29 +0000)]
Fix comment in test/Lexer/utf8-invalid.c for updates in r173959.

llvm-svn: 173961

11 years agoClean up whitespace and indentation a bit
Eli Bendersky [Wed, 30 Jan 2013 19:24:23 +0000 (19:24 +0000)]
Clean up whitespace and indentation a bit

llvm-svn: 173960

11 years agoFix r173881 to properly skip invalid UTF-8 characters in raw lexing and -E.
Jordan Rose [Wed, 30 Jan 2013 19:21:12 +0000 (19:21 +0000)]
Fix r173881 to properly skip invalid UTF-8 characters in raw lexing and -E.

This caused hangs as we processed the same invalid byte over and over.

<rdar://problem/13115651>

llvm-svn: 173959

11 years ago[analyzer] Make shallow mode more shallow.
Anna Zaks [Wed, 30 Jan 2013 19:12:39 +0000 (19:12 +0000)]
[analyzer] Make shallow mode more shallow.

Redefine the shallow mode to inline all functions for which we have a
definite definition (ipa=inlining). However, only inline functions that
are up to 4 basic blocks large and cut the max exploded nodes generated
per top level function in half.

This makes shallow faster and allows us to keep inlining small
functions. For example, we would keep inlining wrapper functions and
constructors/destructors.

With the new shallow, it takes 104s to analyze sqlite3, whereas
the deep mode is 658s and previous shallow is 209s.

llvm-svn: 173958

11 years ago[analyzer] Use analyzer config for max-inlinable-size option.
Anna Zaks [Wed, 30 Jan 2013 19:12:36 +0000 (19:12 +0000)]
[analyzer] Use analyzer config for max-inlinable-size option.

llvm-svn: 173957

11 years ago[analyzer] Move report false positive suppression to report visitors.
Anna Zaks [Wed, 30 Jan 2013 19:12:34 +0000 (19:12 +0000)]
[analyzer] Move report false positive suppression to report visitors.

llvm-svn: 173956

11 years ago[analyzer] Remove further references to analyzer-ipa.
Anna Zaks [Wed, 30 Jan 2013 19:12:26 +0000 (19:12 +0000)]
[analyzer] Remove further references to analyzer-ipa.

Thanks Jordan!

llvm-svn: 173955

11 years agoscan-build: When using Xcode 4.6, use build settings for doing proper build interposi...
Ted Kremenek [Wed, 30 Jan 2013 19:10:24 +0000 (19:10 +0000)]
scan-build: When using Xcode 4.6, use build settings for doing proper build interposition.

llvm-svn: 173954

11 years agoHoist retrieval of Expr* into caller. No functionality change.
Ted Kremenek [Wed, 30 Jan 2013 19:10:21 +0000 (19:10 +0000)]
Hoist retrieval of Expr* into caller.  No functionality change.

Just makes the code a little cleaner, and easier to reason about.

llvm-svn: 173953

11 years ago[preprocessor] Don't warn about "disabled expansion of recursive macro"
Argyrios Kyrtzidis [Wed, 30 Jan 2013 18:55:52 +0000 (18:55 +0000)]
[preprocessor] Don't warn about "disabled expansion of recursive macro"
for "#define X X".

This is a pattern that, for example, stdbool.h uses.
rdar://12435773

llvm-svn: 173952

11 years ago[analyzer] Model trivial copy/move ctors with an aggregate bind.
Jordan Rose [Wed, 30 Jan 2013 18:16:06 +0000 (18:16 +0000)]
[analyzer] Model trivial copy/move ctors with an aggregate bind.

This is faster for the analyzer to process than inlining the constructor
and performing a member-wise copy, and it also solves the problem of
warning when a partially-initialized POD struct is copied.

Before:
  CGPoint p;
  p.x = 0;
  CGPoint p2 = p; <-- assigned value is garbage or undefined

After:
  CGPoint p;
  p.x = 0;
  CGPoint p2 = p; // no-warning

This matches our behavior in C, where we don't see a field-by-field copy.

<rdar://problem/12305288>

llvm-svn: 173951

11 years agoDocumentation: fix escaping in JSON example
Dmitri Gribenko [Wed, 30 Jan 2013 17:58:39 +0000 (17:58 +0000)]
Documentation: fix escaping in JSON example

llvm-svn: 173950

11 years agoDocumentation: add a link to Bear, a tool to help with JSON DB
Dmitri Gribenko [Wed, 30 Jan 2013 17:58:14 +0000 (17:58 +0000)]
Documentation: add a link to Bear, a tool to help with JSON DB

Patch by Laszlo Nagy

llvm-svn: 173949

11 years agoDocumentation: fix link to ExecuteAction(), which was previously typoed as
James Dennett [Wed, 30 Jan 2013 17:53:07 +0000 (17:53 +0000)]
Documentation: fix link to ExecuteAction(), which was previously typoed as
"ExecutionAction()".

llvm-svn: 173948

11 years ago<rdar://problem/12552374> & <rdar://problem/13100674>
Enrico Granata [Wed, 30 Jan 2013 17:44:16 +0000 (17:44 +0000)]
<rdar://problem/12552374> & <rdar://problem/13100674>

The vtable pointer field is not necessarily a pointer and hence cannot be used for validation

llvm-svn: 173947

11 years agoLinker: correctly link in dbg.declare
Manman Ren [Wed, 30 Jan 2013 17:42:15 +0000 (17:42 +0000)]
Linker: correctly link in dbg.declare

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.

llvm-svn: 173946

11 years agoAdd a special ARM trap encoding for NaCl.
Eli Bendersky [Wed, 30 Jan 2013 16:30:19 +0000 (16:30 +0000)]
Add a special ARM trap encoding for NaCl.
More details in this thread: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130128/163783.html

Patch by JF Bastien

llvm-svn: 173943

11 years agohexagon targetinfo changes for getting the relocation kind from string and vice versa
Shankar Easwaran [Wed, 30 Jan 2013 16:05:43 +0000 (16:05 +0000)]
hexagon targetinfo changes for getting the relocation kind from string and vice versa

llvm-svn: 173942

11 years agoAdd missing header and test cases for r173939.
Logan Chien [Wed, 30 Jan 2013 15:48:50 +0000 (15:48 +0000)]
Add missing header and test cases for r173939.

llvm-svn: 173941

11 years agoOverride virtual function for ARM EH directives.
Logan Chien [Wed, 30 Jan 2013 15:39:04 +0000 (15:39 +0000)]
Override virtual function for ARM EH directives.

llvm-svn: 173939

11 years agosimplify hexagon relocations handling
Shankar Easwaran [Wed, 30 Jan 2013 15:38:41 +0000 (15:38 +0000)]
simplify hexagon relocations handling

llvm-svn: 173938

11 years agollvm/Basic/ConvertUTF.h now exposes all functions without macro tricks
Dmitri Gribenko [Wed, 30 Jan 2013 15:12:30 +0000 (15:12 +0000)]
llvm/Basic/ConvertUTF.h now exposes all functions without macro tricks

llvm-svn: 173937

11 years agoLLDB uses ConvertUTF16toUTF8, remove #ifdef
Dmitri Gribenko [Wed, 30 Jan 2013 15:10:12 +0000 (15:10 +0000)]
LLDB uses ConvertUTF16toUTF8, remove #ifdef

llvm-svn: 173936

11 years agoUTF conversion routines were moved from clang/Basic to llvm/Support
Dmitri Gribenko [Wed, 30 Jan 2013 15:05:59 +0000 (15:05 +0000)]
UTF conversion routines were moved from clang/Basic to llvm/Support

llvm-svn: 173935

11 years agoComment parsing: fold named character references test into other HTML tests
Dmitri Gribenko [Wed, 30 Jan 2013 14:44:47 +0000 (14:44 +0000)]
Comment parsing: fold named character references test into other HTML tests

llvm-svn: 173934

11 years agoasan/tsan: manually define FUTEX constants, because <linux/futes.h> header is broken...
Dmitry Vyukov [Wed, 30 Jan 2013 14:39:27 +0000 (14:39 +0000)]
asan/tsan: manually define FUTEX constants, because <linux/futes.h> header is broken on some linux distributions

llvm-svn: 173933

11 years agotsan: fix CPP_WEAK definition (it must be the other way around)
Dmitry Vyukov [Wed, 30 Jan 2013 14:38:44 +0000 (14:38 +0000)]
tsan: fix CPP_WEAK definition (it must be the other way around)

llvm-svn: 173932

11 years agoComment parsing: resolve more named character references
Dmitri Gribenko [Wed, 30 Jan 2013 14:29:28 +0000 (14:29 +0000)]
Comment parsing: resolve more named character references

This reimplements r173850 with a better approach:
(1) use a TableGen-generated matcher instead of doing a linear search;
(2) avoid allocations for new strings by converting code points to string
    iterals with TableGen.

llvm-svn: 173931

11 years ago[Sanitizer] include sanitizer_common headers when building interception library
Alexey Samsonov [Wed, 30 Jan 2013 14:27:41 +0000 (14:27 +0000)]
[Sanitizer] include sanitizer_common headers when building interception library

llvm-svn: 173930

11 years ago[Sanitizer] Add change missed in r173926
Alexey Samsonov [Wed, 30 Jan 2013 13:19:15 +0000 (13:19 +0000)]
[Sanitizer] Add change missed in r173926

llvm-svn: 173929

11 years ago[sanitizer] Further split private and public sanitizer headers.
Evgeniy Stepanov [Wed, 30 Jan 2013 13:12:08 +0000 (13:12 +0000)]
[sanitizer] Further split private and public sanitizer headers.

And make msan_interface.h C-compatible.

llvm-svn: 173928