Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Rewriter / rewrite-anonymous-union.m
blobb5b1aa4f1f5705556b7582135041a611d9d1f6c2
1 // RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5  -o - %s
3 typedef unsigned int uint32_t;
5 typedef struct {
6     union {
7         uint32_t daysOfWeek;
8         uint32_t dayOfMonth;
9     };
10     uint32_t nthOccurrence;
11 } OSPatternSpecificData;
13 @interface NSNumber
14 + (NSNumber *)numberWithLong:(long)value;
15 @end
17 @interface OSRecurrence  {
18     OSPatternSpecificData _pts;
20 - (void)_setTypeSpecificInfoOnRecord;
21 @end
23 @implementation OSRecurrence
24 - (void)_setTypeSpecificInfoOnRecord
26     [NSNumber numberWithLong:(_pts.dayOfMonth >= 31 ? -1 : _pts.dayOfMonth)];
28 @end