Commit Graph

142713 Commits

Author SHA1 Message Date
Evgeniy Stepanov 130fdcd225 Annotate BumpPtrAllocator for MemorySanitizer.
This change adds MemorySanitizer annotations to BumpPtrAllocator to
improve report quality.

llvm-svn: 174051
2013-01-31 09:58:59 +00:00
Enea Zaffanella eb22c870ac Added outer template parameter lists to friend type AST nodes.
llvm-svn: 174050
2013-01-31 09:54:08 +00:00
Evgeniy Stepanov 102846714a [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
2013-01-31 09:53:29 +00:00
Alexey Samsonov 5234a8ed9f Revert r173946. This breaks compilation of googletest with Clang
llvm-svn: 174048
2013-01-31 08:02:11 +00:00
Dmitry Vyukov 6f4a6ab5d6 tsan: switch to explicit thread contexts in Go (instead of monotonic goroutine ids)
llvm-svn: 174047
2013-01-31 07:48:43 +00:00
Dmitry Vyukov 6095285d0b tsan: do not check for intersecting memory accesses in Go (all accesses are 1 byte)
llvm-svn: 174046
2013-01-31 07:47:58 +00:00
Greg Clayton e7fc9ccf2e 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
2013-01-31 06:38:09 +00:00
Bill Wendling d471863c1e 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
2013-01-31 06:22:35 +00:00
Richard Smith 4bca85204e 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
2013-01-31 06:13:11 +00:00
Douglas Gregor 6153500517 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
2013-01-31 05:50:40 +00:00
Michael Gottesman 006039cc74 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
2013-01-31 05:48:48 +00:00
Michael Gottesman 1cffcf74d1 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
2013-01-31 05:44:04 +00:00
Richard Smith 44ecdbdc61 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
2013-01-31 05:19:49 +00:00
Douglas Gregor 52e0de4c6e 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
2013-01-31 05:03:46 +00:00
Douglas Gregor 0a0e2b3631 Allow the computation of the base priority for a declaration code completion result to consider the completion context
llvm-svn: 174037
2013-01-31 04:52:16 +00:00
Richard Smith 8c6eeb9599 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
2013-01-31 04:03:12 +00:00
NAKAMURA Takumi b0944392aa Revert r174026, "Remove Attribute::hasAttributes() and make Attribute::hasAttribute() private."
It broke many hosts to crash.

llvm-svn: 174035
2013-01-31 03:47:28 +00:00
Nick Lewycky f0f5616457 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
2013-01-31 03:23:57 +00:00
Nick Lewycky 60bd4be17a Fix grammar in comment.
llvm-svn: 174033
2013-01-31 03:15:20 +00:00
Richard Smith d202924db6 Clarify the diagnostic for -Wnested-anon-types.
llvm-svn: 174032
2013-01-31 03:11:12 +00:00
Jordan Rose 9a6d4f3644 [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
2013-01-31 02:57:06 +00:00
Dan Gohman 18c77a19ea Change stripAndComputeConstantOffsets to accept a NULL DataLayout pointer
as well.

llvm-svn: 174030
2013-01-31 02:50:36 +00:00
Richard Trieu e673d71a07 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
2013-01-31 02:47:46 +00:00
Dan Gohman 36fa8398f5 Add a comment.
llvm-svn: 174028
2013-01-31 02:45:26 +00:00
Dan Gohman 1b0f79de0a 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
2013-01-31 02:40:59 +00:00
Bill Wendling 3b4a02bf84 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
2013-01-31 02:18:19 +00:00
Richard Smith 56d1215b05 Fix -Wcovered-switch-default and -Wunused-private-field warnings.
llvm-svn: 174025
2013-01-31 02:04:38 +00:00
Dan Gohman 20a2ae9df5 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
2013-01-31 02:00:45 +00:00
Bill Wendling 37f7e18705 Make the AttrBuilder creation method of Attribute private so that people won't use it.
llvm-svn: 174023
2013-01-31 01:51:27 +00:00
Richard Trieu de5cc7d3d8 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
2013-01-31 01:44:26 +00:00
Saleem Abdulrasool 3ea7fc62ef 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
2013-01-31 01:34:59 +00:00
Nick Lewycky 35d2359b1c 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
2013-01-31 01:34:31 +00:00
Daniel Dunbar ae1f040d76 [lit] Move unittest adaptor code into discovery module.
- Also, add a test for it.

llvm-svn: 174019
2013-01-31 01:23:39 +00:00
Daniel Dunbar 25baa132f3 [lit] Run the ShUtil tests as part of the test suite.
llvm-svn: 174018
2013-01-31 01:23:26 +00:00
Daniel Dunbar 33d340e23b [lit] Set parallel mode for coverage tests.
llvm-svn: 174017
2013-01-31 01:23:18 +00:00
Anna Zaks 3a86267192 [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
2013-01-31 01:19:52 +00:00
Matt Beaumont-Gay c7cd308274 Sometimes ld is just ld.
Don't expect a character between the double-quotes and 'ld'.

llvm-svn: 174015
2013-01-31 01:15:55 +00:00
Daniel Dunbar 151e231e82 [lit] Move discovery code into its own module.
llvm-svn: 174014
2013-01-31 01:14:01 +00:00
Douglas Gregor 8e9f55ff13 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
2013-01-31 01:08:35 +00:00
Bill Wendling 82aa8d4926 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
2013-01-31 01:04:51 +00:00
Michael Gottesman 41e4ac4224 Filecheckized 2x tests in SimplifyCFG and removed their date prefix to fit with current llvm style for test names.
llvm-svn: 174011
2013-01-31 01:04:23 +00:00
Bill Wendling b8b16b567c 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
2013-01-31 00:53:21 +00:00
Eric Christopher 258c867c0b Whitespace.
llvm-svn: 174009
2013-01-31 00:50:48 +00:00
Eric Christopher 4e3e94c13d 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
2013-01-31 00:50:46 +00:00
Andrew Trick 7e6f928a7a LangRef: Add a Rationale for volatile rules.
llvm-svn: 174007
2013-01-31 00:49:39 +00:00
Eli Bendersky 6c84b90b70 Replace some more greps with FileChecks in tests
llvm-svn: 174006
2013-01-31 00:44:12 +00:00
Dan Gohman 0838bf7f32 Minor code simplification.
llvm-svn: 174005
2013-01-31 00:32:11 +00:00
Bill Wendling 8594fcbd1a 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
2013-01-31 00:30:05 +00:00
Bill Wendling fe0021a2f9 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
2013-01-31 00:29:54 +00:00
Daniel Dunbar b399246c91 [lit] Add a MANIFEST file and a script for sanity checking the source dist.
llvm-svn: 174002
2013-01-31 00:21:59 +00:00