Commit Graph

37994 Commits

Author SHA1 Message Date
Steve Naroff e50478e0b0 Tune the lookup logic in Sema::ActOnInstanceMessage() to handle private methods (declared within the implementation).
llvm-svn: 44041
2007-11-13 04:10:18 +00:00
Steve Naroff 9d0d4dc7bd Minor indenting changes and removed a level of casting in getClassInterface();
llvm-svn: 44039
2007-11-13 01:40:57 +00:00
Fariborz Jahanian 3a9fe93286 Patch to set context (interface, category, etc.) in which method is declared.
llvm-svn: 44038
2007-11-13 01:10:08 +00:00
Bill Wendling f359fed9f9 Unify CALLSEQ_{START,END}. They take 4 parameters: the chain, two stack
adjustment fields, and an optional flag. If there is a "dynamic_stackalloc" in
the code, make sure that it's bracketed by CALLSEQ_START and CALLSEQ_END. If
not, then there is the potential for the stack to be changed while the stack's
being used by another instruction (like a call).

This can only result in tears...

llvm-svn: 44037
2007-11-13 00:44:25 +00:00
Steve Naroff 4a158f37f9 Fix Sema::CheckAssignmentConstraints() to operate on the canonical, unqualified type.
llvm-svn: 44036
2007-11-13 00:31:42 +00:00
Ted Kremenek e9b83bbd68 Renamed all serialization "Materialize" methods to "Create" to conform with
the new serialization API.

llvm-svn: 44035
2007-11-13 00:25:37 +00:00
Ted Kremenek e7033b0356 Renamed serialization method "Materialize" to "Create". This is an API change.
llvm-svn: 44034
2007-11-13 00:25:08 +00:00
Ted Kremenek cd51750512 Restructured serialization code for decls to make it cleaner, easier to
understand, and batched the emission owned subobjects (using
BatchEmitOwnedPtr) to get a smaller output bitcode size.

llvm-svn: 44033
2007-11-13 00:15:39 +00:00
Ted Kremenek be0a4b734e Fixed bug with inconsistent serialization/deserialization in matching
calls to BatchEmitOwnedPtrs and BatchReadOwnedPtrs.

llvm-svn: 44032
2007-11-13 00:13:57 +00:00
Bill Wendling c8f2f68e87 Move SYSCTL stuff close to where it's used.
llvm-svn: 44031
2007-11-12 23:55:19 +00:00
Devang Patel f48ae28600 Build universal llvm.
llvm-svn: 44030
2007-11-12 23:53:43 +00:00
Anton Korobeynikov bfb139ec93 Completely forgot, that we have some debug information emission on PPC. This should fix
some regressions on ppc nightly tests.

llvm-svn: 44029
2007-11-12 23:36:13 +00:00
Fariborz Jahanian 21f54eeacf Patch to do statically typed ivar references.
llvm-svn: 44028
2007-11-12 22:29:28 +00:00
Steve Naroff fedb49771d Add category method definitions incrementally, removing a FIXME (like we do for class implementations).
llvm-svn: 44027
2007-11-12 22:05:31 +00:00
Fariborz Jahanian 2d0d3ba43e Minor twik for when there is no super class and 'super' is errornously used.
llvm-svn: 44026
2007-11-12 20:20:37 +00:00
Fariborz Jahanian d98a734bd6 'super' nailed.
llvm-svn: 44025
2007-11-12 20:13:27 +00:00
Bruno Cardoso Lopes b439132d16 Added JumpTable support
Fixed some AsmPrinter issues
Added GLOBAL_OFFSET_TABLE Node handle.

llvm-svn: 44024
2007-11-12 19:49:57 +00:00
Steve Naroff 040f696bfc Fix regression to Sema::ObjcActOnStartOfMethodDef()...need to initialize InvalidType field to false.
llvm-svn: 44023
2007-11-12 19:48:27 +00:00
Steve Naroff cd002f5a0e Add an error diagnostic to Parse::ParseObjCMessageExpression().
This now exposes the following bug...

******************** TEST 'Sema/message.m' FAILED! ********************
Command: 
 clang -fsyntax-only -verify Sema/message.m
Output:
Errors seen but not expected:
  Line 9: invalid receiver to message expression
******************** TEST 'Sema/message.m' FAILED! ********************

As far as I can tell, all messages to method agruments fail.

The method arguments are built by Sema::ObjcActOnStartOfMethodDef().

llvm-svn: 44022
2007-11-12 19:18:37 +00:00
Ted Kremenek e33ba16368 Added versions of ReadPtr that takes an explicit SerializedPtrID. This allows
clients of the Deserializer to read the pointer ID before they are ready
to deserialize the object (which can mean registering a pointer reference
with the backpatcher).

Changed some methods that took an argument "SerializedPtrID" to "const SerializedPtrID&" (pass-by-reference).  This is to accommodate a future
revision of SerializedPtrID where it may be much fatter than an unsigned
integer.

llvm-svn: 44021
2007-11-12 19:11:15 +00:00
Ted Kremenek 0035bf33c4 In Stmt serialization, renamed directEmit to EmitImpl and
directMaterialize to CreateImpl.

llvm-svn: 44020
2007-11-12 18:04:32 +00:00
Owen Anderson c520c4b325 Break critical edges coming into blocks with PHI nodes.
llvm-svn: 44019
2007-11-12 17:27:27 +00:00
Steve Naroff b342361c0d Now that we can refer to instance variables, make sure they are considered lvalues.
llvm-svn: 44017
2007-11-12 14:34:27 +00:00
Steve Naroff e46504b278 Implement instance variable references.
llvm-svn: 44016
2007-11-12 14:29:37 +00:00
Steve Naroff e3d1ab29da - Minor cleanup to yesterday's changes to Sema::ObjcActOnStartOfMethodDef();
- Add Sema::CurMethodDecl, in preparation for adding ObjcIvarRefExpr.
- Add ObjcInterfaceDecl::lookupInstanceVariable(), in prep for adding ivars.
- A couple renames in ObjcInterfaceDecl, while I was in the vicinity:-)

llvm-svn: 44015
2007-11-12 13:56:41 +00:00
Gordon Henriksen 1ced282c73 Typo fix in the tutorial.
llvm-svn: 44014
2007-11-12 13:46:21 +00:00
Duncan Sands 5dc0c9282f Compile fix.
llvm-svn: 44013
2007-11-12 13:43:23 +00:00
Owen Anderson 933b5b7e62 Add a flag for indirect branch instructions.
Target maintainers: please check that the instructions for your target are correctly marked.

llvm-svn: 44012
2007-11-12 07:39:39 +00:00
Evan Cheng be51f28e2b Refactor some code.
llvm-svn: 44010
2007-11-12 06:35:08 +00:00
Steve Naroff 8e5c112add Forgot this file from my last commit...
llvm-svn: 44009
2007-11-12 05:02:46 +00:00
Steve Naroff ff4dbff4f4 Remove Action::ObjcActOnMethodDefinition(). Rationale:
- It is not an "action" - it is never called by the parser.
- It was only used by one method, Sema::ObjcActOnStartOfMethodDef().

As a result, the logic it embodied is now directly implemented in Sema::ObjcActOnStartOfMethodDef().

llvm-svn: 44008
2007-11-12 04:59:00 +00:00
Steve Naroff 3434bebec9 Make sure @property is allowed within a category.
Bug submitted by Keith Bauer.

CookieJar:Desktop keith$ cat test.m
#import <WebKit/WebKit.h>

llvm-svn: 44007
2007-11-12 04:22:52 +00:00
Steve Naroff d0bf516e70 Remove Sema::ObjcBuildMethodParameter().
Modify Sema::ParseParamDeclarator() to work for both ActOnStartOfFunctionDef() and ObjcActOnStartOfMethodDef().

llvm-svn: 44006
2007-11-12 03:44:46 +00:00
Owen Anderson 556fb3467b Fix rewriting of PHI nodes.
Could someone more familiar with machine-level stuff review this for me?

llvm-svn: 44005
2007-11-12 02:13:07 +00:00
Hartmut Kaiser 28af9f7d00 Updated VC++ build system
llvm-svn: 44004
2007-11-12 01:24:50 +00:00
Owen Anderson f66f0d619a Remove unnecessary #include's.
llvm-svn: 44003
2007-11-12 01:19:28 +00:00
Owen Anderson a1cd45213d As Chris and Evan pointed out, BreakCriticalMachineEdges doesn't really need
to be a pass of its own.  Instead, move it out into a helper method.

llvm-svn: 44002
2007-11-12 01:05:09 +00:00
Owen Anderson 55f4e5d2dd Fix on 64-bit machines.
llvm-svn: 44001
2007-11-12 00:56:04 +00:00
Steve Naroff b313fc3203 Replace 2 method definition actions (ActOnFunctionDefBody, ActOnMethodDefBody) with 1 method definition action (ActOnFinishFunctionBody). I can't think of any reason that we would need two action hooks.
llvm-svn: 44000
2007-11-11 23:20:51 +00:00
Steve Naroff bb87572d70 Replace 3 method definition functions (ObjcParseMethodDefinition, ParseObjCInstanceMethodDefinition, ParseObjCClassMethodDefinition) with 1 method definition function (ParseObjCMethodDefinition).
Less code/confusion.

llvm-svn: 43999
2007-11-11 19:54:21 +00:00
Anton Korobeynikov 0644bb865e Clarify the meaning of '-2' register number
llvm-svn: 43998
2007-11-11 19:53:50 +00:00
Anton Korobeynikov 4edfea438a Use TableGen to emit information for dwarf register numbers.
This makes DwarfRegNum to accept list of numbers instead.
Added three different "flavours", but only slightly tested on x86-32/linux.
Please check another subtargets if possible,

llvm-svn: 43997
2007-11-11 19:50:10 +00:00
Steve Naroff 49effdefef Tweak Sema::ActOnInstanceMessage() to treat the built-in "Class" type the same as "id".
llvm-svn: 43996
2007-11-11 17:52:25 +00:00
Steve Naroff cac26f4f5f This is the last 5% of the solution to teaching Sema::ActOnInstanceMessage() about private methods (r43989).
While the diff is large, the idea is very simple. When we parse method definitions (in an @implementation), we need to add them incrementally (rather than wait until the @end).

Other details...

- Renamed Sema::ActOnAddMethodsToObjcDecl() to Sema::ActOnAtEnd(). The methods are now optional arguments.
- Removed Parser::AllImplMethods (a nice cleanup).
- Added location info to ObjcImplementationDecl (since we will need it very soon:-)
- Modified message.m test to no longer allow the bogus diagnostic.

llvm-svn: 43995
2007-11-11 17:19:15 +00:00
Steve Naroff 5f9ae64f6e Make sure Sema::CheckIncrementDecrementOperand() removes typedefs when doing it's analysis.
Thanks to Seo Sanghyeon for his excellent (first) bug fix!

llvm-svn: 43994
2007-11-11 14:15:57 +00:00
Anton Korobeynikov a468a11d80 Add convenient helper to obtain list of ints
llvm-svn: 43993
2007-11-11 11:19:37 +00:00
Steve Naroff 22e078e013 Teach Sema::ActOnInstanceMessage() about private methods. That is, methods declared in an implementation (but not listed in the interface).
This commit is only 95% of the bug fix. The last piece to this puzzle is to add the method decls to the implementation incrementally (as we encounter them). At the moment, the methods aren't added until we see an @end (which is too late).

I will complete this later...

llvm-svn: 43989
2007-11-11 00:10:47 +00:00
Dale Johannesen b988e7e8cd Add CCAssignToStackABISizeAlign for convenience in
dealing with types whose size & alignment are
different on different subtargets.  Use it for x86 f80.

llvm-svn: 43988
2007-11-10 22:07:15 +00:00
Fariborz Jahanian 0bd56b7727 Fixed a bug which exposed the internally built type to user code.
llvm-svn: 43987
2007-11-10 22:00:55 +00:00
Fariborz Jahanian 16e3123071 pretty priting for method definitions.
llvm-svn: 43986
2007-11-10 20:59:13 +00:00