forked from OSchip/llvm-project
As a hopefully temporary workaround for a header mistake, treat
__bridge_retain as a synonym for __bridge_retained. llvm-svn: 133295
This commit is contained in:
parent
f733f7d730
commit
0c32925aa0
|
@ -426,6 +426,7 @@ KEYWORD(__pixel , KEYALTIVEC)
|
|||
KEYWORD(__bridge , KEYARC)
|
||||
KEYWORD(__bridge_transfer , KEYARC)
|
||||
KEYWORD(__bridge_retained , KEYARC)
|
||||
KEYWORD(__bridge_retain , KEYARC)
|
||||
|
||||
// Alternate spelling for various tokens. There are GCC extensions in all
|
||||
// languages, but should not be disabled in strict conformance mode.
|
||||
|
|
|
@ -104,6 +104,7 @@ static void getDarwinDefines(MacroBuilder &Builder, const LangOptions &Opts,
|
|||
Builder.defineMacro("__bridge", "");
|
||||
Builder.defineMacro("__bridge_transfer", "");
|
||||
Builder.defineMacro("__bridge_retained", "");
|
||||
Builder.defineMacro("__bridge_retain", "");
|
||||
}
|
||||
|
||||
if (Opts.Static)
|
||||
|
|
|
@ -1780,7 +1780,8 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr,
|
|||
} else if (ExprType >= CompoundLiteral &&
|
||||
(Tok.is(tok::kw___bridge) ||
|
||||
Tok.is(tok::kw___bridge_transfer) ||
|
||||
Tok.is(tok::kw___bridge_retained))) {
|
||||
Tok.is(tok::kw___bridge_retained) ||
|
||||
Tok.is(tok::kw___bridge_retain))) { // FIXME: temporary workaround
|
||||
// Parse an Objective-C ARC ownership cast expression.
|
||||
ObjCBridgeCastKind Kind;
|
||||
if (Tok.is(tok::kw___bridge))
|
||||
|
|
|
@ -27,7 +27,10 @@ void to_cf(id obj) {
|
|||
CFTypeRef cf1 = (__bridge_retained CFTypeRef)CreateSomething();
|
||||
CFStringRef cf2 = (__bridge_retained CFStringRef)CreateNSString();
|
||||
CFTypeRef cf3 = (__bridge CFTypeRef)CreateSomething();
|
||||
CFStringRef cf4 = (__bridge CFStringRef)CreateNSString();
|
||||
CFStringRef cf4 = (__bridge CFStringRef)CreateNSString();
|
||||
|
||||
// rdar://problem/9629566 - temporary workaround
|
||||
CFTypeRef cf5 = (__bridge_retain CFTypeRef)CreateSomething();
|
||||
}
|
||||
|
||||
void fixits() {
|
||||
|
|
Loading…
Reference in New Issue