Commit Graph

81824 Commits

Author SHA1 Message Date
Anders Carlsson d78b224e91 More renames.
llvm-svn: 100991
2010-04-11 22:07:06 +00:00
Anders Carlsson b41c633a34 Rename a function parameter.
llvm-svn: 100990
2010-04-11 22:03:57 +00:00
Ted Kremenek 33b9a42f41 Add CIndex support for blocks.
llvm-svn: 100989
2010-04-11 21:47:37 +00:00
Ted Kremenek 85421e9555 Update checker build.
llvm-svn: 100987
2010-04-11 21:02:52 +00:00
Anders Carlsson de0338abac Clarify an assertion.
llvm-svn: 100986
2010-04-11 20:23:06 +00:00
Anders Carlsson 343a26b56d Fix a bug where we were adding too many vcall offsets in some cases.
llvm-svn: 100985
2010-04-11 20:04:11 +00:00
Dan Gohman 008a38b1d6 Add a cast to void to show that the return value is being
intentionally ignored.

llvm-svn: 100984
2010-04-11 19:30:19 +00:00
Dan Gohman 7841a6ecd2 Delete a dead check.
llvm-svn: 100983
2010-04-11 19:29:41 +00:00
Chris Lattner b986aba6db add haiku support, patch by Paul Davey!
llvm-svn: 100982
2010-04-11 19:29:39 +00:00
Dan Gohman 2532856704 Delete dead code.
llvm-svn: 100981
2010-04-11 19:28:47 +00:00
Dan Gohman 93cd0f1278 Fix a #include.
llvm-svn: 100980
2010-04-11 19:27:52 +00:00
Dan Gohman b50349a979 Rename isLoopGuardedByCond to isLoopEntryGuardedByCond, to emphasise
that it's only testing for the entry condition, not full loop-invariant
conditions.

llvm-svn: 100979
2010-04-11 19:27:13 +00:00
Benjamin Kramer fedd987f4b utostr isn't going away too soon, try to make it slightly smaller.
llvm-svn: 100977
2010-04-11 19:00:03 +00:00
Chris Lattner 6033be79b3 avoid double negatives
llvm-svn: 100976
2010-04-11 18:53:08 +00:00
Ted Kremenek 5868ec6e3d Fix CFG bug where bases of member expressions were not always evaluated in a lvalue context. Fixes <rdar://problem/7813989>.
llvm-svn: 100966
2010-04-11 17:02:10 +00:00
Ted Kremenek 66de60376c Fix bug in AddStmtChoice:asLValue() where 'AsLValueNotAlwaysAdd' would not be treated as indicating an lvalue.
llvm-svn: 100965
2010-04-11 17:02:04 +00:00
Ted Kremenek d2ba1f9ff0 Sort visitor methods. No functionality change.
llvm-svn: 100964
2010-04-11 17:01:59 +00:00
Benjamin Kramer 249f50ca04 Fix run line so this test actually tests something.
llvm-svn: 100962
2010-04-11 09:39:39 +00:00
Chris Lattner a36ec4243b fix PR6811 by not parsing 'super' as a magic expression in
LookupInObjCMethod.  Doing so allows all sorts of invalid code
to slip through to codegen.  This patch does not change the 
AST representation of super, though that would now be a natural
thing to do since it can only be in the receiver position and
in the base of a ObjCPropertyRefExpr.

There are still several ugly areas handling super in the parser,
but this is definitely a step in the right direction.

llvm-svn: 100959
2010-04-11 08:28:14 +00:00
Chris Lattner 90c58faea6 actually the interface grossness in the previous patch was due to
typo correction.  However, now that the code has been factored out
of LookupMemberExpr, it can recurse to itself instead of to 
LookupMemberExpr!  Remove grossness.

llvm-svn: 100958
2010-04-11 07:51:10 +00:00
Chris Lattner 2b1ca5fb8a factor the code that handles "expr.field" when expr is a
pointer to an objc interface out to a method in SemaExprObjC.
This is *much* uglier than it should be due to grossness in
LookupMemberExpr :(

llvm-svn: 100957
2010-04-11 07:45:24 +00:00
Chris Lattner 00dcffded1 fix a problem causing us to lose the ''s around objc interface names
in a diagnostic.

llvm-svn: 100956
2010-04-11 07:04:01 +00:00
Daniel Dunbar 2131f9ba8c Simplify test, in the hopes of making linux happy.
llvm-svn: 100955
2010-04-11 01:10:44 +00:00
Nick Lewycky 3e24f7e632 Remove dead argument and clean whitespace. No functionality change.
llvm-svn: 100954
2010-04-10 23:18:13 +00:00
Anders Carlsson 0b5522114e Enable an assert and remove a now unnecessary assert.
llvm-svn: 100953
2010-04-10 21:50:08 +00:00
Anders Carlsson 7a148f7141 Fix another vbase layout bug.
llvm-svn: 100952
2010-04-10 21:35:33 +00:00
Anders Carlsson 5b441d73b7 Add a simple debug-only verification pass to the record layout builder.
llvm-svn: 100951
2010-04-10 21:24:48 +00:00
Anders Carlsson 88cf34f2b4 Fix a bug where we would add the same function twice in a vtable.
llvm-svn: 100949
2010-04-10 20:39:29 +00:00
Chris Lattner bd7b0a8d55 revert 100942, pending discussion.
llvm-svn: 100946
2010-04-10 19:33:39 +00:00
Anders Carlsson be1b9cbc63 Rename VtableComponent and VtableBuilder.
llvm-svn: 100945
2010-04-10 19:13:06 +00:00
Chris Lattner 4568ed7893 Implement support for varargs functions without any fixed
parameters in the CBE by implicitly adding a fixed argument.
This allows eliminating a work-around from DAE.  Patch by
Sylvere Teissier!

llvm-svn: 100944
2010-04-10 19:12:44 +00:00
Anders Carlsson 6a75ebb137 Rename -dump-record-layouts to -fdump-record-layouts now that the option behaves like aa flag.
llvm-svn: 100943
2010-04-10 19:09:13 +00:00
David Chisnall 916fb83f39 Fix for PR6811.
llvm-svn: 100942
2010-04-10 19:06:38 +00:00
Daniel Dunbar 4e06a5b8b3 configure: Fix default value for optimize_option, I messed up the test condition
in r86005 and unintentionally changed the default from -O3 to -O2.

 - It's odd the things automated perf testing turns up! :)

 - Also, the configure diff is messed up slightly. It looks like someone either
   didn't regenerate configure correctly (or I didn't), or autoconf has some
   funnyness in it. Eric, any ideas?

This has been at -O2 for so long, that I am slightly nervous that this change
will uncover miscompiles of LLVM on other systems. If that is the case, I think
we should just set the default universally at -O3, and let developers/vendors
use -O3 if they want it and have tested it.

llvm-svn: 100941
2010-04-10 18:56:24 +00:00
Anders Carlsson 291279e3a6 Simplify the virtual base layout code and fix a bug where we wouldn't store the offset for a virtual base.
llvm-svn: 100940
2010-04-10 18:42:27 +00:00
Chris Lattner bc3be65d2e fix PR6805: llvm.objectsize changed to take an i1 instead of an i32.
llvm-svn: 100938
2010-04-10 18:34:14 +00:00
Chris Lattner 9ae28b141f fix PR6743, a case where we'd delete an instruction before using it
in some cases.

llvm-svn: 100937
2010-04-10 18:26:57 +00:00
Chris Lattner b9801ffcb5 fix PR6760, a missing check in heap SRoA.
llvm-svn: 100936
2010-04-10 18:19:22 +00:00
Daniel Dunbar 06ef31c8b1 Driver: Only add extra -L paths on darwin if they exist. Unfortunately, this
means it isn't really possible to write the test case for this code, but this is
the kind of thing that really requires testing against the installed compiler
anyway.

llvm-svn: 100935
2010-04-10 18:18:57 +00:00
Chris Lattner f60b74806f turn an assert into a proper check, fixing crash on invalid here:
$ llvm-as t.ll
llvm-as: t.ll:1:6: error: expected 'type' after '='
%0 = = type { i32, float, float, double }
     ^

PR6810.

llvm-svn: 100934
2010-04-10 18:01:25 +00:00
Chris Lattner 3a747aef96 improve haiku portability, patch by Paul Davey.
llvm-svn: 100933
2010-04-10 17:54:51 +00:00
Chris Lattner 2694145e2e add attributes and module level asm to the ocaml bindings,
patch by Patrick Walton!

llvm-svn: 100932
2010-04-10 17:52:58 +00:00
Daniel Dunbar 6e444c07b7 Tweak test for portability.
llvm-svn: 100931
2010-04-10 17:45:01 +00:00
Daniel Dunbar 16334e143f Driver: Ignore -fobjc-gc and -fobjc-gc-only for platforms which don't support them.
llvm-svn: 100930
2010-04-10 16:20:23 +00:00
Benjamin Kramer 1554e4a4bb A bunch of string-related microoptimizations in Mangler.
llvm-svn: 100928
2010-04-10 16:03:31 +00:00
Benjamin Kramer 2e8ca0b86d Fix use after free. Incrementing an use_iterator after its user is erased is unsafe.
llvm-svn: 100926
2010-04-10 11:02:40 +00:00
Sebastian Redl c72350ea9f When a member pointer is dereferenced, the class it points into must be complete. Enforce this.
llvm-svn: 100925
2010-04-10 10:14:54 +00:00
John McCall e2f3524f83 Doug pointed out that we have a perfectly reasonable expression here to
serve as a source of source locations for the can't-yet-mangle diagnostic.

llvm-svn: 100924
2010-04-10 09:39:25 +00:00
John McCall 23eebd9c1e Diagnose more cases of initializing distinct members of an anonymous union
member.  Use a better diagnostic for this case.  Also fix a bug with nested
anonymous structs/unions for -Wreorder;  this last was PR6575.

llvm-svn: 100923
2010-04-10 09:28:51 +00:00
John McCall bb7b658ab5 Diagnose misordered initializers in constructor templates immediately instead of
when they're instantiated.  Merge the note into the -Wreorder warning;  it
doesn't really contribute much, and it was splitting a thought across diagnostics
anyway.  Don't crash in the parser when a constructor's initializers end in a
comma and there's no body;  the recovery here is still terrible, but anything's
better than a crash.

llvm-svn: 100922
2010-04-10 07:37:23 +00:00