objc: fix an ir-gen crash caused by recent

property refactoring. // rdar://10327068

llvm-svn: 143139
This commit is contained in:
Fariborz Jahanian 2011-10-27 20:06:32 +00:00
parent bd307a5372
commit cceafc4931
2 changed files with 49 additions and 1 deletions

View File

@ -497,7 +497,7 @@ Sema::ActOnStartOfSwitchStmt(SourceLocation SwitchLoc, Expr *Cond,
return StmtError();
CondResult
= ConvertToIntegralOrEnumerationType(SwitchLoc, Cond,
= ConvertToIntegralOrEnumerationType(SwitchLoc, CondResult.take(),
PDiag(diag::err_typecheck_statement_requires_integer),
PDiag(diag::err_switch_incomplete_class_type)
<< Cond->getSourceRange(),

View File

@ -0,0 +1,48 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-arc -o - %s
// rdar://10327068
@class NSString;
@interface NSAssertionHandler {
}
+ (NSAssertionHandler *)currentHandler;
- (void)handleFailureInMethod:(SEL)selector object:(id)object file:(NSString *)fileName lineNumber:(int)line ,...;
@end
typedef enum
{
MWRaceOrder_MeetName,
MWRaceOrder_MeetPosition,
MWRaceOrder_MeetDistance,
MWRaceOrder_Name,
MWRaceOrder_Position,
MWRaceOrder_Distance,
MWRaceOrder_Default = MWRaceOrder_Name,
MWRaceOrder_MeetDefault = MWRaceOrder_MeetName,
} MWRaceOrder;
@interface MWViewMeetController
@property (nonatomic, assign) MWRaceOrder raceOrder;
@end
@implementation MWViewMeetController
- (int)orderSegment
{
switch (self.raceOrder)
{
default:
{ [(NSAssertionHandler *)0 handleFailureInMethod:_cmd object:self file:(NSString*)0 lineNumber:192 ]; };
break;
}
return 0;
}
@synthesize raceOrder;
@end