Commit Graph

110734 Commits

Author SHA1 Message Date
Douglas Gregor 3ea7269b54 Move the creation of the predefined typedef for Objective-C's 'id'
type over into the AST context, then make that declaration a
predefined declaration in the AST format. This ensures that different
AST files will at least agree on the (global) declaration ID for 'id',
and eliminates one of the "special" types in the AST file format.

llvm-svn: 137429
2011-08-12 05:46:01 +00:00
Chris Lattner 1ec8114eb8 Fix an obscure bug in PointerUnion that would bite PointerUnion3/4. Basically,
when checking isNull(), we'd pick off the sentinel bit for the outer 
PointerUnion, but would not recursively convert the inner pointerunion to bool,
so if *its* sentinel bit is set, isNull() would incorrectly return false.

No testcase, because someone hit this when they were trying to refactor code
to use PointerUnion3, but they since found a better solution.

llvm-svn: 137428
2011-08-12 04:31:38 +00:00
Craig Topper a2dee81dec Fix a raw string literal test case to actually use a raw string literal.
llvm-svn: 137427
2011-08-12 04:09:37 +00:00
Ted Kremenek 06b8cd7324 Fix crash in CFGBuilder involving implicit destructor calls and gotos jumping after an object was declared. Fixes PR 10620.
llvm-svn: 137426
2011-08-12 04:09:00 +00:00
Eli Friedman 4826b7f13a Misc atomic doc tweaks; reordering operations across Acquire/Release can be beneficial.
llvm-svn: 137425
2011-08-12 03:38:32 +00:00
NAKAMURA Takumi 4e5ad1713a include/llvm/Config/config.h.cmake: Reorder to follow config.h.in, and import stuff from llvm-config.h.cmake and clang/config.h.
llvm-svn: 137424
2011-08-12 03:27:54 +00:00
NAKAMURA Takumi 0d888ad7bb CMake: Eliminate unused checks and #undef(s) as below;
STACK_DIRECTION
YYTEXT_POINTER
HAVE_NAMESPACES
HAVE_STD_ITERATOR
HAVE_FWD_ITERATOR
HAVE_BI_ITERATOR
HAVE_GLOBAL_HASH_MAP
HAVE_GLOBAL_HASH_SET
HAVE_GNU_EXT_HASH_MAP
HAVE_GNU_EXT_HASH_SET
HAVE_STD_EXT_HASH_MAP
HAVE_STD_EXT_HASH_SET

llvm-svn: 137423
2011-08-12 03:27:48 +00:00
Craig Topper c0a06c5cfd Fix a couple raw string literal tests
llvm-svn: 137422
2011-08-12 03:20:18 +00:00
Jason Molenda 7efc7e949c Fixes the occasional crash on exit when quitting lldb with control-D.
If the IOChannel has already freed out its m_driver member, and
there's still a character to be read/written (that is, the ^D
character), just skip that char instead of trying to write through
a null object pointer.

llvm-svn: 137421
2011-08-12 02:40:17 +00:00
Akira Hatanaka ae31c7af1c Alignment of a va_arg must be at least as large as the ABI's minimum alignment.
llvm-svn: 137420
2011-08-12 02:30:14 +00:00
Enrico Granata 22c55d180d *Some more optimizations in usage of ConstString
*New setting target.max-children-count gives an upper-bound to the number of child objects that will be displayed at each depth-level
  This might be a breaking change in some scenarios. To override the new limit you can use the --show-all-children (-A) option
  to frame variable or increase the limit in your lldbinit file
*Command "type synthetic" has been split in two:
  - "type synthetic" now only handles Python synthetic children providers
  - the new command "type filter" handles filters
  Because filters and synthetic providers are both ways to replace the children of a ValueObject, only one can be effective at any given time.

llvm-svn: 137416
2011-08-12 02:00:06 +00:00
NAKAMURA Takumi e45db981e4 include/clang/Config/config.h.cmake: Reorder and reword to follow (generated) llvm/Config/config.h.in.
llvm-svn: 137415
2011-08-12 01:56:14 +00:00
Benjamin Kramer 91ea511436 MachOWriter: Don't crash on fixups with arithmetic, emit a relocation instead. This matches what as does.
llvm-svn: 137414
2011-08-12 01:51:29 +00:00
NAKAMURA Takumi 69c158f587 include/llvm/Config/llvm-config.h: Reorder and reword to follow (generated) config.h.in.
llvm-svn: 137413
2011-08-12 01:50:50 +00:00
NAKAMURA Takumi 818a22be13 configure: Update since r136721.
llvm-svn: 137412
2011-08-12 01:50:43 +00:00
Akira Hatanaka dabfc21fbf Add definition of a static member of a class.
llvm-svn: 137411
2011-08-12 01:43:14 +00:00
Douglas Gregor 851443c5b9 Collapse ASTWriter::WriteASTChain into ASTWriter::WriteASTCore,
eliminating a pile of redundant code (and probably some bugs in the
process). The variation between chained and non-chained PCH is fairly
small now anyway.

llvm-svn: 137410
2011-08-12 01:39:19 +00:00
Bill Wendling 023e761555 Remove extra semicolons.
llvm-svn: 137409
2011-08-12 01:29:32 +00:00
Eli Friedman c67b9d3879 Fix up this paragraph (including a nasty typo).
llvm-svn: 137408
2011-08-12 01:26:06 +00:00
Johnny Chen ff7f3cd277 Fix a logic error caught by the static analyzer.
llvm-svn: 137407
2011-08-12 01:22:56 +00:00
Nick Lewycky 1c5f3fa197 The diagtool registration system tries to use a global variable from a method
called on another global variable. Use ManagedStatic to ensure that the global
we register with actually exists when we need it.

llvm-svn: 137406
2011-08-12 01:14:22 +00:00
Johnny Chen 160ee8b43d Fix some warnings from static analyzer.
The initialization of 'replicated_element' to 0 is needed, otherwise we get a garbage value to start with.

llvm-svn: 137405
2011-08-12 01:10:45 +00:00
Andrew Trick 210bf8351d findDeadCallerSavedReg fix: Missing NULL terminator in register arrays.
Fix by Ivan Baev. Sorry I don't have a unit test, but the fix is obvious so I don't want to delay it.

llvm-svn: 137404
2011-08-12 00:49:19 +00:00
Andrew Trick 7bab70a7a5 Clarify the definition of SequentiallyConsistent operations.
llvm-svn: 137403
2011-08-12 00:36:38 +00:00
Dan Gohman 10a18d55ce Don't convert objc_autoreleaseReturnValue to objc_autorelease if the result
is returned through a bitcast.

llvm-svn: 137402
2011-08-12 00:36:31 +00:00
Anna Zaks 9b25cee36f Optimizations for Dependent Symbol tracking (as per Ted's code review for r137309):
1) Change SymbolDependTy map to keep pointers as data. And other small tweaks like making the DenseMap smaller 64->16 elements; remove removeSymbolDependencies() as it will probably not be used.

2) Do not mark dependents live more then once.

llvm-svn: 137401
2011-08-12 00:34:56 +00:00
Nick Lewycky 0847b3a6d3 A virtual destructor for the class with virtual methods!
llvm-svn: 137400
2011-08-12 00:32:15 +00:00
Dan Gohman 121302772d Don't let arbitrary calls disrupt nested retain+release pairs if
the retains and releases all use the same SSA pointer value.

Also, don't let CFG hazards disrupt nested retain+release pair
optimizations.

llvm-svn: 137399
2011-08-12 00:26:31 +00:00
Dan Gohman 4767a1a117 Use an actual reverse-CFG reverse-postorder for the bottom-up traversal,
rather than plain postorder, so that CFG constructs like single-exit loops
are reliably visited in a sensible order.

llvm-svn: 137398
2011-08-12 00:24:29 +00:00
Jakob Stoklund Olesen 1f582ba609 Simplify the interference checking code a bit.
This is possible now that we now longer provide an interface to iterate
the interference overlaps.

llvm-svn: 137397
2011-08-12 00:22:04 +00:00
Johnny Chen 1cee80c081 Silence the static analyzer.
llvm-svn: 137396
2011-08-12 00:21:20 +00:00
Douglas Gregor dab42432d7 In the serialized AST format, make the translation unit a "predefined"
declaration that never actually gets serialized. Instead, serialize
the various kinds of update records (lexical decls, visible decls, the
addition of an anonymous namespace) for the translation unit, even if
we're not chaining. This way, we won't have to deal with multiple
loaded translation unit declarations.

llvm-svn: 137395
2011-08-12 00:15:20 +00:00
Johnny Chen d397dc80eb Fix two 'dereference of a null pointer' detected by the static analyzer.
llvm-svn: 137394
2011-08-12 00:02:24 +00:00
Jim Grosbach 1978ddf769 Clean up formatting a bit.
llvm-svn: 137393
2011-08-11 23:57:17 +00:00
Sean Callanan 912855fd27 Fixed LLDB's handling of ElaboratedTypes, which was
causing problems with printing the values of persistent
variables with struct types.

llvm-svn: 137392
2011-08-11 23:56:13 +00:00
Jim Grosbach 8cffa28af8 ARM vector compare to zero instruction assembly parsing support.
llvm-svn: 137389
2011-08-11 23:51:13 +00:00
Eli Friedman 1696033373 Fix mismatched tag.
llvm-svn: 137388
2011-08-11 23:48:52 +00:00
Johnny Chen ec34c6aba5 Silence the static analyzer.
llvm-svn: 137387
2011-08-11 23:47:21 +00:00
Eli Friedman 7b8cc7e938 Revision to Atomics guide, per Chris's comments.
llvm-svn: 137386
2011-08-11 23:44:25 +00:00
Andrew Trick 2d8494a030 A slew of unit tests for the recent LoopInfo::updateUnloop feature
checked in at r137276 and r137341.

llvm-svn: 137385
2011-08-11 23:38:09 +00:00
Andrew Trick 2b6860f0a1 Allow loop unrolling to get known trip counts from ScalarEvolution.
SCEV unrolling can unroll loops with arbitrary induction variables. It
is a prerequisite for -disable-iv-rewrite performance. It is also
easily handles loops of arbitrary structure including multiple exits
and is generally more robust.

This is under a temporary option to avoid affecting default
behavior for the next couple of weeks. It is needed so that I can
checkin unit tests for updateUnloop.

llvm-svn: 137384
2011-08-11 23:36:16 +00:00
Argyrios Kyrtzidis 1d233f9a5e Fix a PCH crash bug where we kept a reference inside a DenseMap while the map was getting modified.
No test case, sorry. It's one of those bugs where it's really really hard to make one. rdar://9910862.

llvm-svn: 137383
2011-08-11 23:26:42 +00:00
Ted Kremenek d33c4d39a0 scan-build: enable C++ support by default.
llvm-svn: 137382
2011-08-11 22:47:20 +00:00
Jakob Stoklund Olesen da0192d72b Remove the InterferenceResult class.
llvm-svn: 137381
2011-08-11 22:46:06 +00:00
Jakob Stoklund Olesen cd14efaec2 Eliminate the last use of InterferenceResult.
The Query class now holds two iterators instead of an InterferenceResult
instance. The iterators are used as bookmarks for repeated
collectInterferingVRegs calls.

llvm-svn: 137380
2011-08-11 22:46:04 +00:00
Akira Hatanaka 79d60d0e94 Enclose directive .cprestore with .set macro and nomacro to silence assembler
warning. 

llvm-svn: 137378
2011-08-11 22:42:31 +00:00
Richard Trieu aee9e76722 The current warning in -Wnull-arithmetic for comparisons between NULL and non-pointers is not very helpful. This patch will update the wording to be more helpful to users.
Old warning:

warning: use of NULL in arithmetic operation [-Wnull-arithmetic]
  return 10 <= NULL;
            ^  ~~~~

New warning:

warning: comparison between NULL and non-pointer ('int' and NULL) [-Wnull-arithmetic]
  return 10 <= NULL;
         ~~ ^  ~~~~
llvm-svn: 137377
2011-08-11 22:38:21 +00:00
Jim Grosbach aa07cb6a98 Fix tests per now-correct encoding as of r137371.
llvm-svn: 137376
2011-08-11 22:31:48 +00:00
Jim Grosbach 37f7e6b2f4 Remove no-longer-true comments. These are for the assembler, also.
llvm-svn: 137375
2011-08-11 22:30:30 +00:00
Johnny Chen ec95565a9d Fix 'Undefined or garbage value returned to caller' (static analyzer).
llvm-svn: 137374
2011-08-11 22:23:44 +00:00