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
Steve Naroff
257b4a2467
Fix a basic bug (having to do with typedefs) in Sema::UsualArithmeticConversions().
...
This resuled in the following crash below.
Also modified the usual-float.c test case to capture this case.
[steve-naroffs-imac:clang/test/Sema] snaroff% ../../../../Debug/bin/clang usual-float.c
Assertion failed: (0 && "Sema::UsualArithmeticConversions(): illegal float comparison"), function UsualArithmeticConversions, file SemaExpr.cpp, line 960.
0 clang 0x001ef9b9 _ZN40_GLOBAL__N_Signals.cpp_00000000_4E6DAF8315PrintStackTraceEv + 45
1 clang 0x001efd5f _ZN40_GLOBAL__N_Signals.cpp_00000000_4E6DAF8313SignalHandlerEi + 323
2 libSystem.B.dylib 0x90c6297b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 libSystem.B.dylib 0x90cdb782 raise + 26
5 libSystem.B.dylib 0x90cead3f abort + 73
6 libSystem.B.dylib 0x90cdc923 __assert_rtn + 101
7 clang 0x00077316 _ZN5clang4Sema26UsualArithmeticConversionsERPNS_4ExprES3_b + 1004
8 clang 0x000803cf _ZN5clang4Sema27CheckMultiplyDivideOperandsERPNS_4ExprES3_NS_14SourceLocationEb + 181
9 clang 0x0007a8e8 _ZN5clang4Sema10ActOnBinOpENS_14SourceLocationENS_3tok9TokenKindEPvS4_ + 472
10 clang 0x000cf058 _ZN5clang6Parser26ParseRHSOfBinaryExpressionENS_6Action12ActionResultILj0EEEj + 1286
11 clang 0x000cf2de _ZN5clang6Parser25ParseAssignmentExpressionEv + 86
llvm-svn: 43985
2007-11-10 19:45:54 +00:00
Ted Kremenek
b0cdfeb4ba
Fixed a bug introduced by my last patch. Now we properly clear out the BatchIDVec
...
vector before reusing it.
llvm-svn: 43984
2007-11-10 19:33:26 +00:00
Ted Kremenek
cdf5fca367
Fixed hack in BatchReadOwnedPtrs to no longer use the array of pointers passed in for
...
deserialization as a temporary location for storing serialized pointer identifiers. The
definition of SerializedPtrID will likely change significantly in the future, and the
current implementation caused compilation errors on some 64-bit machines.
llvm-svn: 43983
2007-11-10 19:28:49 +00:00
Ted Kremenek
195c478e1b
Updated method signature to conform with the typedef in the method prototype.
...
llvm-svn: 43982
2007-11-10 19:19:32 +00:00
Steve Naroff
68754c59bc
Since we are all working on Leopard, change the built-in MacOS X version number (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) to target Leopard. This is only a short term solution, until the clang driver implements the "-mmacosx-version-min" flag (which will compute this value based on the target).
...
llvm-svn: 43981
2007-11-10 18:06:36 +00:00
Fariborz Jahanian
6aafd4130b
Minor code clean up in method def area.
...
llvm-svn: 43980
2007-11-10 17:40:57 +00:00
Fariborz Jahanian
85e1d0d807
Represent method definitions as separate AST nodes. Pretty print will come next.
...
llvm-svn: 43979
2007-11-10 16:31:34 +00:00