Commit Graph

81811 Commits

Author SHA1 Message Date
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
Gabor Greif d394aec87d rely even less on CallInst internals
llvm-svn: 100919
2010-04-10 03:45:50 +00:00
Gabor Greif d0ef1346f3 do not rely on CallInst interna, use CallSite to access arguments
llvm-svn: 100918
2010-04-10 02:56:12 +00:00
Daniel Dunbar 4364558956 Driver/Darwin/x86: When linking, incorporate -L paths based on the path where
Clang is installed. This is designed to match gcc, and is important when
installed in a non-standard location.
 - This is gross, but no worse than ever. It will die when we finally move to
   the compiler-rt based toolchain, any day now.

llvm-svn: 100915
2010-04-10 01:24:22 +00:00
Daniel Dunbar 584344f2ec Disable diag::err_file_modified on Win32 completely, until someone cares to fix
it. PR6812.
 - This is another attempt at silencing annoying buildbot failures.

llvm-svn: 100914
2010-04-10 01:17:16 +00:00
Sean Callanan a4ae4e7693 Updated the edis build mechanism to allow for builds
that do not build some (or all) of the targets that
edis supports.

llvm-svn: 100910
2010-04-10 00:48:10 +00:00
John McCall e8917e0fd2 Mangle some expressions with codegen implications but no mangling "overhead".
llvm-svn: 100909
2010-04-09 22:54:09 +00:00
Dan Gohman 70e572e740 Fix a typo and some indentation.
llvm-svn: 100908
2010-04-09 22:47:25 +00:00
John McCall 6936c863b0 Provide an extremely unsatisfactory diagnostic (instead of crashing) when
mangling an unknown expression kind.  Also conveniently tells the user what
kind of expression they should add to the mangler!

llvm-svn: 100907
2010-04-09 22:26:14 +00:00
Dan Gohman 607e02b33a When determining a canonical insert position, don't climb deeper
into adjacent loops. Also, ensure that the insert position is
dominated by the loop latch of any loop in the post-inc set which
has a latch.

llvm-svn: 100906
2010-04-09 22:07:05 +00:00
John McCall 09277542f2 Provide manglings for bool and character literal expressions. These are
just integer-literal expressions with special case implementations in the AST.

Fixes rdar://problem/7825453.

llvm-svn: 100905
2010-04-09 21:48:08 +00:00
Bob Wilson 67dd3a4464 Tidy whitespace.
llvm-svn: 100904
2010-04-09 21:38:26 +00:00
Douglas Gregor 530805711f When upgrading an Objective-C class from a forward declaration to a
full-fledged @interface, be sure that the declaration has the right
lexical context. <rdar://problem/7827709>

llvm-svn: 100903
2010-04-09 21:30:38 +00:00
Douglas Gregor 06aa50417d Only complain about explicit instantiations following explicit
specializations when the explicit instantiation was... explicitly
written, i.e., not the product of an explicit instantiation of an
enclosing class. Fixes this spurious warning when Clang builds LLVM:

/Volumes/Data/dgregor/Projects/llvm/lib/CodeGen/MachineDominators.cpp:22:1:
warning: explicit instantiation of 'addRoot' that occurs after an
explicit specialization will be ignored (C++0x extension) [-pedantic]

llvm-svn: 100900
2010-04-09 21:02:29 +00:00