Ted Kremenek
53155f379e
Changed serialization/deserialization of BuiltinTypes to explicitly serialize
...
each type. This ensures that the order in which the types are serialized
is clear and remains persistent.
llvm-svn: 43615
2007-11-01 17:10:34 +00:00
Ted Kremenek
baa461893b
Reverted unnecessary inlining of operator!=, since negating operator== is
...
just as efficient and much more succinct.
llvm-svn: 43614
2007-11-01 16:35:25 +00:00
Devang Patel
32714064b1
Propagate bitfield info.
...
llvm-svn: 43613
2007-11-01 16:29:56 +00:00
Steve Naroff
50d4205ff9
Implement rewrite rule for commenting out protocol references. For example:
...
extern id /*<NSObject>*/ NSAllocateObject(Class aClass, unsigned extraBytes, NSZone *zone);
extern void NSDeallocateObject(id /*<NSObject>*/object);
extern id /*<NSObject>*/ NSCopyObject(id /*<NSObject>*/object, unsigned extraBytes, NSZone *zone);
llvm-svn: 43612
2007-11-01 13:24:47 +00:00
Chris Lattner
b338a6b9f3
add support for vector type compatibility checking. Patch by Nate Begeman.
...
llvm-svn: 43604
2007-11-01 05:03:41 +00:00
Steve Naroff
2f55b98725
Tweak RewriteInterfaceDecl() to generate a typedef (if one hasn't already been generated).
...
llvm-svn: 43600
2007-11-01 03:35:41 +00:00
Chris Lattner
c3ebf29ef6
Implement test/Sema/init.c by treating functions as constants.
...
llvm-svn: 43599
2007-11-01 02:45:17 +00:00
Anders Carlsson
41b7c6b250
Put constant CFStrings in the __DATA,__cfstring section.
...
llvm-svn: 43593
2007-11-01 00:41:52 +00:00
Anders Carlsson
1e27f9b296
Stub out codegen for __builtin_constant_p. Remove any implicit cast exprs in the call to __builtin___CFStringMakeConstantString.
...
llvm-svn: 43592
2007-11-01 00:39:26 +00:00
Devang Patel
0b59b45870
Remove unnecessary method.
...
llvm-svn: 43591
2007-11-01 00:11:37 +00:00
Devang Patel
ad175428c6
start adding pading fields.
...
llvm-svn: 43590
2007-11-01 00:07:12 +00:00
Fariborz Jahanian
7a9c47480d
1) More additions for objective-c's qualifier type.
...
2) Fixed a test failure (which should have failed all along!).
llvm-svn: 43589
2007-10-31 23:53:01 +00:00
Anders Carlsson
e89b84ab29
Fix a typo that prevented pointer-to-int conversions from working.
...
llvm-svn: 43588
2007-10-31 23:18:02 +00:00
Devang Patel
f5fcb9870a
Refactor code into a separate method.
...
llvm-svn: 43587
2007-10-31 23:17:19 +00:00
Fariborz Jahanian
c3cda76362
Fixed a bug exposed by fixing the assert in previous patch (one of the tests asserted).
...
llvm-svn: 43586
2007-10-31 23:08:24 +00:00
Fariborz Jahanian
aa9a95ca4f
Changed direction of assert. Added more comments.
...
llvm-svn: 43585
2007-10-31 22:57:04 +00:00
Ted Kremenek
6aff871a84
Implemented more of serialization/deserialization for ASTContext. We now
...
(hypothetically) read in/write out most of the types. Bugs likely exist.
llvm-svn: 43584
2007-10-31 22:44:07 +00:00
Steve Naroff
9c4fdddd0c
Fix two rewriter bugs:
...
- For @class , don't generate multiple typedefs.
- Handle the following edge case interface...
@interface NSMiddleSpecifier : NSObject {}
@end
...which was incorrectly being rewritten to...
struct _interface_NSMiddleSpecifier {
struct _interface_NSObject _NSObject;
};
{}
llvm-svn: 43582
2007-10-31 22:11:35 +00:00
Anders Carlsson
0370eb2034
Handle function calls that return aggregate expressions.
...
llvm-svn: 43581
2007-10-31 22:04:46 +00:00
Fariborz Jahanian
d822d68b74
More infrastructure to recognize objective-c's type qualifiers (in,inout, etc.)
...
llvm-svn: 43580
2007-10-31 21:59:43 +00:00
Devang Patel
cc4c2930ae
New test to verify llvm struct layout.
...
llvm-svn: 43577
2007-10-31 21:02:10 +00:00
Devang Patel
6029cbf872
Check whether next slot meets field type's alignment requirements.
...
If it does not then assert at the moment.
llvm-svn: 43576
2007-10-31 21:01:37 +00:00
Steve Naroff
aaba027717
Implement ObjC built-in types in MinimalAction.
...
This fixes the recent regression with selector-1.m and -parse-noop.
llvm-svn: 43575
2007-10-31 20:55:39 +00:00
Ted Kremenek
b681c68a7e
Implemented short-circuited version of Builtin::Info::operator!=.
...
llvm-svn: 43574
2007-10-31 20:55:27 +00:00
Devang Patel
1c8788bbd0
Keep track of field offsets during structure layout.
...
Take 2.
llvm-svn: 43573
2007-10-31 20:08:22 +00:00
Devang Patel
75ef2f0b45
Take 2.
...
Make target info available to clang code generator. This is far from complete but this helps clang codegen module make progress.
At the moment target triplet and target description strings are hard coded in clang::TargetInfo
llvm-svn: 43572
2007-10-31 20:01:01 +00:00
Ted Kremenek
c55cd9a38a
Adjusted QualType deserialization to reflect updated deserialization API.
...
We now serialize ivar references inside of ASTContext.
llvm-svn: 43571
2007-10-31 20:00:03 +00:00
Devang Patel
7abb7acafd
Initialize MemCpyFn
...
llvm-svn: 43569
2007-10-31 19:54:57 +00:00
Fariborz Jahanian
95b6076c77
Fixed problem with rewriting stand-alone @implementation (with no matching @interface).
...
A new test case added.
llvm-svn: 43568
2007-10-31 18:48:14 +00:00
Steve Naroff
6d40db0dde
Implement a more sensible strategy for ObjC built-in types (addressing a long standing FIXME in Sema::GetObjcIdType()).
...
This removes several gross hacks to work around the previous "lazy" behavior.
Two notes:
- MinimalActions still needs to be taught about the built-in types (This breaks one of the -noop test cases). I started this, then added a FIXME.
- I didn't convert Sema::GetObjcProtoType() yet.
llvm-svn: 43567
2007-10-31 18:42:27 +00:00
Ted Kremenek
e32c067cc4
Preliminary support for serializing statements.
...
llvm-svn: 43566
2007-10-31 18:41:19 +00:00
Ted Kremenek
d2f7cc9f2b
Updated path to clang.cpp in build documentation.
...
llvm-svn: 43564
2007-10-31 17:58:51 +00:00
Ted Kremenek
468b1cb96f
Updated build instructions to not include an absolute line number in clang.cpp to add hard-coded paths.
...
llvm-svn: 43563
2007-10-31 17:57:30 +00:00
Ted Kremenek
08bed095eb
Updated a comment to hopefully silence a Lattner warning.
...
llvm-svn: 43562
2007-10-31 17:53:38 +00:00
Ted Kremenek
9cc9335bdf
Implemented serialization of Variable Array Types (VLAs).
...
llvm-svn: 43561
2007-10-31 17:50:23 +00:00
Fariborz Jahanian
aff228dfc7
Rewriteing of ivars changed to just copy directly from the source.
...
llvm-svn: 43560
2007-10-31 17:29:28 +00:00
Ted Kremenek
fc581a9a89
Renamed ivar "ArrayTypes" in ASTContext to "ComplexArrayTypes".
...
Added skeleton code for serialization of ASTContext.
llvm-svn: 43558
2007-10-31 17:10:13 +00:00
Steve Naroff
ac0216385f
Checking in some code that is still under construction.
...
I need to (finally) change the way Class/id/SEL/IMP are built-in...the current approach of doing it in the preprocessor is "broken". The other problem is Sema::GetObjcIdType/GetObjcSelType/GetObjcClassType, the hooks that initialize ASTContext lazily. These built-in types need to be done up front...
llvm-svn: 43557
2007-10-31 16:03:04 +00:00
Fariborz Jahanian
d728e949bb
After Anders check-in, we can now encode 'Class' type.
...
llvm-svn: 43556
2007-10-31 16:00:13 +00:00
Ted Kremenek
f1d34d3fea
Added a few clarifying steps the the "building clang" section.
...
llvm-svn: 43555
2007-10-31 15:31:24 +00:00
Chris Lattner
5087e267c2
temporarily revert devang's patch to link in the llvm codegen etc.
...
llvm-svn: 43544
2007-10-31 04:53:03 +00:00
Steve Naroff
37e011ce43
Add some plumbing to help cope with rewriting "id<p>", "Class<p>*".
...
llvm-svn: 43543
2007-10-31 04:38:33 +00:00
Anders Carlsson
f56a7aee2f
Encode Class, SEL and Objective-C objects.
...
llvm-svn: 43540
2007-10-31 02:53:19 +00:00
Devang Patel
df62bc067a
Keep track of field offsets during structure layout.
...
llvm-svn: 43539
2007-10-31 01:23:10 +00:00
Devang Patel
46c7003052
Make target info available to clang code generator.
...
This is far from complete but this helps clang codegen module
make progress.
llvm-svn: 43536
2007-10-31 00:59:29 +00:00
Fariborz Jahanian
ca5338196f
Added new type and bitfield fields in some decl types in preparation for objective-c's type qualifiers.
...
Added initialization of Class/SEMA types.
llvm-svn: 43534
2007-10-31 00:12:35 +00:00
Devang Patel
82ae5f255f
Avoid unnecessary PATypeHolder copy.
...
llvm-svn: 43530
2007-10-30 23:22:14 +00:00
Steve Naroff
5cdcd9b61c
Stop pre-defining objc_msgSend/objc_getClass in the preprocessor. Instead, I generate these declaration on the fly when rewriting a message expression.
...
llvm-svn: 43529
2007-10-30 23:14:51 +00:00
Ted Kremenek
e26f3c50c5
Updated some comments.
...
Disabled assignments for ContentCache.
Copy-ctor for ContentCache now has an assertion preventing it to
be copied from an object that already has an allocated buffer.
llvm-svn: 43526
2007-10-30 22:57:35 +00:00
Chris Lattner
595db86c9d
__real__ and __imag__ can be lvalues. Add support to ast and codegen for them.
...
llvm-svn: 43525
2007-10-30 22:53:42 +00:00