Commit Graph

59140 Commits

Author SHA1 Message Date
Eli Friedman c97d014a9a Fix silly mistake that was breaking tests. Sorry for any inconvenience.
llvm-svn: 70664
2009-05-03 06:04:26 +00:00
Chris Lattner 2c295cfee8 rename some variables, improve comments.
llvm-svn: 70663
2009-05-03 05:59:17 +00:00
Chris Lattner 34b51e88ec refactor matched operand type checking to happen after the AsmStmt is created,
no functionality change.

llvm-svn: 70662
2009-05-03 05:55:43 +00:00
Dan Gohman 5036695c32 Revert r70645 for now; it's causing a variety of regressions.
llvm-svn: 70661
2009-05-03 05:46:20 +00:00
Ted Kremenek 7d79a5f87d Convert ArgEffects from an std::vector to an ImmutableMap. This will make it much easier to clean up the summary generation logic with annotations.
llvm-svn: 70660
2009-05-03 05:20:50 +00:00
Eli Friedman 7903ca0993 Add diagnostic for r70658.
llvm-svn: 70659
2009-05-03 05:02:08 +00:00
Eli Friedman eed8ad2057 Add Sema support for __builtin_setjmp/__builtin_longjmp. The primary
reason for adding these is to error out in CodeGen when trying to generate
them instead of silently emitting a call to a non-existent function.

(Note that it is not valid to lower these to setjmp/longjmp; in addition 
to that lowering being different from the intent, setjmp and longjmp 
require a larger buffer.)

llvm-svn: 70658
2009-05-03 04:46:36 +00:00
Ted Kremenek b4cf4a52ab Rename isTrackedObjectType() -> isTrackedObjCObjectType().
llvm-svn: 70657
2009-05-03 04:42:10 +00:00
Douglas Gregor b8c6d5dca5 When a fix-it hint would span multiple lines, don't print it; half a
fix-it hint is much worse than no fix-it hint. (Fixes PR4084).

When we need to truncate a source line to fix in the terminal, make
sure to take the width of the fix-it information into account, too.

llvm-svn: 70656
2009-05-03 04:33:32 +00:00
Douglas Gregor 54c6a3bf66 When we truncate a source line to fit it within the terminal width,
show an ellipsis where we have removed text. An example:

/Users/dgregor/Projects/llvm/tools/clang/test/Misc/message-length.c:18:120:
warning: 
      comparison of distinct pointer types ('int *' and 'float *')
  ...a_func_to_call(ip == FloatPointer, ip[ALongIndexName], ...
                    ~~ ^  ~~~~~~~~~~~~

llvm-svn: 70655
2009-05-03 04:12:51 +00:00
Douglas Gregor 6f5a38bcc5 Respect the COLUMNS environment variable for word-wrapping (so we get
word-wrapping by default in Emacs; yay!). Thanks, Daniel.

Use LLVM's System layer rather than calling isatty() directly.

Fix a thinko in printing the indentation string that was causing some
weird output.

llvm-svn: 70654
2009-05-03 03:52:38 +00:00
Nick Lewycky 431f97e4f0 Revert r70630. Go back to appending ".b" to internal globals when shrinking
them to bool.

llvm-svn: 70653
2009-05-03 03:49:08 +00:00
Daniel Dunbar bdb23a1f56 Fix invalid error about duplicate declaration of padding bit field in
an interface.

llvm-svn: 70652
2009-05-03 01:08:28 +00:00
Zhongxing Xu 3e3e69bbe7 region store: make Retrieve() can retrieve embedded array correctly. Also
simplify the retrieve logic.

llvm-svn: 70651
2009-05-03 00:27:40 +00:00
Daniel Dunbar b7126db9b0 Remove ccc from the makefile as well.
llvm-svn: 70650
2009-05-02 23:50:24 +00:00
Daniel Dunbar 49aff46fed ccc is dead.
llvm-svn: 70649
2009-05-02 22:13:56 +00:00
Daniel Dunbar 82f61f96ba Driver: Treat -m32 and -m64 as "driver-only" arguments.
- In particular, don't forward them to gcc; these participate in the
   selection of the tool chain, which should know how to talk to gcc
   and be fixed if it doesn't.

llvm-svn: 70648
2009-05-02 22:09:19 +00:00
Daniel Dunbar 5716d87ed1 Driver: When using the generic gcc tool, pass -m32 or -m64 if we
recognize the architecture.
 - This is an attempt to force gcc to the write target.

 - PR4094.

llvm-svn: 70647
2009-05-02 21:41:52 +00:00
Dan Gohman afd2c44e72 Add an svn:ignore for unittests/VMCore.
llvm-svn: 70646
2009-05-02 21:20:51 +00:00
Dan Gohman e9a38d16fe Convert ScalarEvolution to use CallbackVH for its internal map. This
makes ScalarEvolution::deleteValueFromRecords, and it's code that
subtly needed to be called before ReplaceAllUsesWith, unnecessary.

It also makes ValueDeletionListener unnecessary.

llvm-svn: 70645
2009-05-02 21:19:20 +00:00
Dan Gohman 745ad4486e Apply Jeffrey Yasskin's CallbackVH patch, with minor tweaks from me
to make the copy constructor and destructor protected, and corresponding
adjustments to the unittests.

llvm-svn: 70644
2009-05-02 21:10:48 +00:00
Dan Gohman ec42f369ee Include <limits.h> to get the definition of CHAR_BIT.
llvm-svn: 70643
2009-05-02 21:03:21 +00:00
Dan Gohman b17dcbdadc The second argument to RecursivelyDeleteTriviallyDeadInstructions has
a default value, and will hopefully be going away soon.

llvm-svn: 70642
2009-05-02 20:22:10 +00:00
Daniel Dunbar e3e263fb71 Driver: Generate an error when trying to pass an LLVM bc input to a
non-Darwin linker (sorry Gold + LTO-plugin users).

llvm-svn: 70641
2009-05-02 20:14:53 +00:00
Daniel Dunbar 10c6ee968f Use clang to find clang-cc, if it isn't in path.
llvm-svn: 70640
2009-05-02 20:08:07 +00:00
Chris Lattner 195f88386c when creating custom warning diagnostics, do not attempt to map
them with -Werror.  Custom diags cannot be mapped, and this makes
-Werror cause a determinstic crash for the checker and other
clients of the custom diagnostics machinery.  rdar://6816191

llvm-svn: 70639
2009-05-02 19:34:21 +00:00
Ted Kremenek f1e7667099 retain/release checker: Enhance leak description to say that the bug
occurs in GC mode.

llvm-svn: 70638
2009-05-02 19:05:19 +00:00
Anders Carlsson 38ebcaa8c8 Fix a thinko and a test.
llvm-svn: 70637
2009-05-02 18:36:10 +00:00
Dan Gohman ff08995589 Previously, RecursivelyDeleteDeadInstructions provided an option
of returning a list of pointers to Values that are deleted. This was
unsafe, because the pointers in the list are, by nature of what
RecursivelyDeleteDeadInstructions does, always dangling. Replace this
with a simple callback mechanism. This may eventually be removed if
all clients can reasonably be expected to use CallbackVH.

Use this to factor out the dead-phi-cycle-elimination code from LSR
utility function, and generalize it to use the
RecursivelyDeleteTriviallyDeadInstructions utility function.

This makes LSR more aggressive about eliminating dead PHI cycles;
adjust tests to either be less trivial or to simply expect fewer
instructions.

llvm-svn: 70636
2009-05-02 18:29:22 +00:00
Daniel Dunbar cc9123424f DragonFly ToolChain definition for driver.
- Patch by Alex Hornung!

llvm-svn: 70635
2009-05-02 18:28:39 +00:00
Anders Carlsson 8b98d02976 Downgrade the invalid offsetof error to a warning.
llvm-svn: 70634
2009-05-02 17:45:47 +00:00
Dan Gohman f150572af7 When ScalarEvolution is told to forget the trip count for a loop, have
it also forget any SCEVs associated with loop-header PHIs in the loop,
as they may be dependent on trip count information.

llvm-svn: 70633
2009-05-02 17:43:35 +00:00
Dan Gohman c27345f0b4 Tell ScalarEvolution that the loop is being deleted before actually
deleting it.  This will let ScalarEvolution be more complete about
updating its records.

llvm-svn: 70632
2009-05-02 17:29:26 +00:00
Nick Lewycky 462cd34332 Don't append ".b" to the names of globals that are being shrunk to booleans.
llvm-svn: 70630
2009-05-02 16:21:50 +00:00
Dan Gohman 6409e7d4e9 Don't split critical edges during the AddUsersIfInteresting phase
of LSR. This makes the AddUsersIfInteresting phase of LSR a pure
analysis instead of a phase that potentially does CFG modifications.

The conditions where this code would actually perform a split are
rare, and in the cases where it actually would do a split the split
is usually undone by CodeGenPrepare, and in cases where splits
actually survive into codegen, they appear to hurt more often than
they help.

llvm-svn: 70625
2009-05-02 05:36:01 +00:00
Douglas Gregor 71235ecb7f When determining whether an expression refers to a bit-field, look
into the left-hand side of an assignment expression. This completes
most of PR3500; the only remaining part is to deal with the
GCC-specific implementation-defined behavior for "unsigned long" (and
other) bit-fields.

llvm-svn: 70623
2009-05-02 02:18:30 +00:00
Ted Kremenek 49805454e6 Add CFG support for @synchronized. This fixes <rdar://problem/6848820>.
llvm-svn: 70620
2009-05-02 01:49:13 +00:00
Dan Gohman e6b424e53a Add Base.td to svn:ignore.
llvm-svn: 70619
2009-05-02 01:29:12 +00:00
Chris Lattner c6ad258a6b When creating a dwarf record type for an objc interface, make sure to propagate
the runtime version number onto it, so that the debugger knows it's an objc
interface, not a C struct.  rdar://6848435

llvm-svn: 70618
2009-05-02 01:13:16 +00:00
Chris Lattner 44f3ea7339 capture whether optimizations are enabled or not in debug info
llvm-svn: 70617
2009-05-02 01:04:13 +00:00
Chris Lattner 5912de15d0 encode the version of the objc runtime into the dwarf compile unit. rdar://6848435,
several other fixes coming.

llvm-svn: 70616
2009-05-02 01:00:04 +00:00
Ted Kremenek f520136939 Update checker build.
llvm-svn: 70615
2009-05-02 00:42:33 +00:00
Ted Kremenek 2bfed98b0a Add another null pointer check test case.
llvm-svn: 70614
2009-05-02 00:41:02 +00:00
Douglas Gregor d2c2d172da Fix bitfield promotions in several more cases. We don't seem to work hard enough at determining whether an expression is a bitfield or not, yet.
llvm-svn: 70613
2009-05-02 00:36:19 +00:00
Ted Kremenek 55957a8490 Fix crasher in CFG construction when not properly handling ASTs that contain
expressions not yet properly handled by the CFGBuilder. This failure resulted in
a null CFGBlock* being used in rare cases (causing a crash).

llvm-svn: 70612
2009-05-02 00:13:27 +00:00
Douglas Gregor 637f5f71e1 When -fmessage-length=N is not specified, and if standard error is
going to a terminal, word-wrap to the length of the terminal.

llvm-svn: 70611
2009-05-02 00:03:46 +00:00
Chris Lattner e01821edbd 'The attached patch fixes an issue where llc -march=cpp fails with
"Invalid primitive type" on input containing the x86_fp80 type.'
Patch by Collin Winter!

llvm-svn: 70610
2009-05-01 23:54:26 +00:00
Chris Lattner 82c1512ce4 Drop the default assumption about alignment down to 2 bits from 3. This apparently
helps some problems on win32 platforms (PR4119)

llvm-svn: 70603
2009-05-01 23:48:33 +00:00
Chris Lattner a305422bf5 explicitly know that the alignment of Type* is 3 bits.
llvm-svn: 70602
2009-05-01 23:47:59 +00:00
Mike Stump a71286315f Add Sema checking for __block on vm declarations. Radar 6441502
llvm-svn: 70601
2009-05-01 23:41:47 +00:00