Devang Patel
e11664a0ef
Rename classes and collections that maintain record layout information.
...
Now, at AST level record info is maintained by ASTRecordLayout class.
Now, at code gen level record info is maintained by CGRecordLayout class.
llvm-svn: 43619
2007-11-01 19:11:01 +00:00
Ted Kremenek
26a7f3fd56
Implemented serialization of QualTypes within ASTContext. Clarified
...
ownership model of some type pointers. Added FIXMEs to serialization.
Added comments to ASTContext indicating which variables we are intentionally
*not* serializing.
llvm-svn: 43618
2007-11-01 18:11:32 +00:00
Fariborz Jahanian
ac73ff8868
Remaining work to collect objective-c's type qualifiers and use them to encode
...
method types.
llvm-svn: 43617
2007-11-01 17:18:37 +00:00
Steve Naroff
63006473d5
- Remove _interface_ prefix for the synthesized tag names.
...
- Also removed a tab from the generated struct (minor).
llvm-svn: 43616
2007-11-01 17:12:31 +00:00
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
Duncan Sands
e0e774b6fd
Don't barf on empty basic blocks. Do not rely on assert
...
doing something - this needs to work for release builds
too. I chose to just abort rather than following the
fancy logic of abortIfBroken, because (1) it is a pain
to do otherwise, and (2) nothing is going to work if the
module is this broken.
llvm-svn: 43611
2007-11-01 10:50:26 +00:00
Bill Wendling
87f460f8ba
Silence a warning saying that the variables always resolve to "true" in an
...
expression.
llvm-svn: 43610
2007-11-01 09:38:19 +00:00
Bill Wendling
b7cabbe295
Silence, accersed warning
...
llvm-svn: 43609
2007-11-01 08:51:44 +00:00
Bill Wendling
2b3f7a7e3b
Get rid of compilation warning during release builds
...
llvm-svn: 43608
2007-11-01 08:24:40 +00:00
Chris Lattner
68613c7d31
Add the start of chapter 6, still much to go.
...
llvm-svn: 43607
2007-11-01 06:49:54 +00:00
Evan Cheng
fe1ac52836
- Coalesce extract_subreg when both intervals are relatively small.
...
- Some code clean up.
llvm-svn: 43606
2007-11-01 06:22:48 +00:00
Owen Anderson
2ed651ace7
Fix test/Transforms/DeadStoreElimination/PartialStore.ll, which had been
...
silently failing because of an incorrect run line for some time.
llvm-svn: 43605
2007-11-01 05:29:16 +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
Chris Lattner
dff7a3e919
remove verifier command line option: this should be part of the API, not
...
a command line optn.
llvm-svn: 43603
2007-11-01 04:43:13 +00:00
Chris Lattner
059a8df289
add a broken gcc version, thanks to P. Durante for pointing this out.
...
llvm-svn: 43602
2007-11-01 04:20:16 +00:00
Owen Anderson
fe41d79112
Now with less tabs!
...
llvm-svn: 43601
2007-11-01 03:54:23 +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
Dale Johannesen
440f9abab4
Test that expand_vector_elt(v2i64) works in 32-bit mode.
...
llvm-svn: 43598
2007-11-01 02:38:24 +00:00
Chris Lattner
6ab19ed78d
Fix InstCombine/2007-10-31-StringCrash.ll by removing an obvious
...
(in hindsight) infinite recursion. Simplify the code.
llvm-svn: 43597
2007-11-01 02:30:35 +00:00
Chris Lattner
74709473ed
Fix InstCombine/2007-10-31-RangeCrash.ll
...
llvm-svn: 43596
2007-11-01 02:18:41 +00:00
Ted Kremenek
fb764e52b0
Rewrote backpatcher. Backpatcher now stores the "has final pointer"
...
flag in the **key** of the backpatch map, as opposed to the mapped
value which contains either the final pointer, or a pointer to a chain
of pointers that need to be backpatched. The bit flag was moved to
the key because we were erroneously assuming that the backpatched
pointers would be at an alignment of >= 2 bytes, which obviously
doesn't work for character strings. Now we just steal the bit from the key.
llvm-svn: 43595
2007-11-01 00:57:37 +00:00
Ted Kremenek
df0768e1b1
Added typedef "value_type" to DenseMap (similar typedef appears in std::map).
...
Added method FindAndConstruct() to DenseMap, which does the same thing as
operator[], except that it refers value_type& (a reference to both the
key and mapped data pair). This method is useful for clients that wish
to access the stored key value, as opposed to the key used to do the
actual lookup (these need not always be the same).
Redefined operator[] to use FindAndConstruct() (same logic).
llvm-svn: 43594
2007-11-01 00:54:57 +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
Ted Kremenek
fb41f72916
constified several pointer arguments for methods in the Deserializer.
...
llvm-svn: 43583
2007-10-31 22:42:03 +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
Dan Gohman
b43e020cdb
Fix a regression in test/CodeGen/X86/2007-04-24-VectorCrash.ll introduced
...
by r43510. Gracefully handle constants with vector type that aren't
ConstantVector or ConstantAggregateZero.
llvm-svn: 43579
2007-10-31 21:36:31 +00:00
Owen Anderson
9396c39501
Add a preverifier pass to check that every basic block ends in a terminator, so that we don't segfault when verifying invalid code.
...
llvm-svn: 43578
2007-10-31 21:04:18 +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
Ted Kremenek
705770664d
Implemented deserialization of references. References are handled
...
just like pointers, except that they cannot be backpatched. This
means that references are essentially non-owning pointers where the
referred object must be deserialized prior to the reference being
deserialized. Because of the nature of references, this ordering of
objects is always possible.
Fixed a bug in backpatching code (returning the backpatched pointer
would accidentally include a bit flag).
llvm-svn: 43570
2007-10-31 19:58:32 +00:00