[cfe-commits] r49932 - /cfe/trunk/Driver/RewriteObjC.cpp
Steve Naroff
snaroff at apple.com
Fri Apr 18 14:55:08 PDT 2008
Author: snaroff
Date: Fri Apr 18 16:55:08 2008
New Revision: 49932
URL: http://llvm.org/viewvc/llvm-project?rev=49932&view=rev
Log:
Implement FIXME discoved by <rdar://problem/5874876> Rewriter: Explicit ivar refs outside a method are being rewritten
Modified:
cfe/trunk/Driver/RewriteObjC.cpp
Modified: cfe/trunk/Driver/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteObjC.cpp?rev=49932&r1=49931&r2=49932&view=diff
==============================================================================
--- cfe/trunk/Driver/RewriteObjC.cpp (original)
+++ cfe/trunk/Driver/RewriteObjC.cpp Fri Apr 18 16:55:08 2008
@@ -846,13 +846,12 @@
}
}
}
+ } else { // we are outside a method.
+ if (IV->isFreeIvar())
+ assert(1 && "Cannot have a free standing ivar outside a method");
+ // Explicit ivar refs do not need to be rewritten. Do nothing.
}
- // FIXME: Implement public ivar access from a function.
- Expr *Replacement = new MemberExpr(IV->getBase(), true, D,
- IV->getLocation(), D->getType());
- ReplaceStmt(IV, Replacement);
- delete IV;
- return Replacement;
+ return IV;
}
//===----------------------------------------------------------------------===//
More information about the cfe-commits
mailing list