summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/RewriteObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-01-07 22:51:18 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-01-07 22:51:18 +0000
commitbc6811c32ec15cfe8474da26b71b2c2cee610579 (patch)
tree7b75c8659a421f17e1927078650d74241541cc26 /clang/lib/Frontend/RewriteObjC.cpp
parenta52cf2ca3f7fca07e1aae6e83ca95c03b9692e5d (diff)
downloadbcm5719-llvm-bc6811c32ec15cfe8474da26b71b2c2cee610579.tar.gz
bcm5719-llvm-bc6811c32ec15cfe8474da26b71b2c2cee610579.zip
Fixes a bug where we were rewriting two definitions of
_objc_method (part of radar 7490408). llvm-svn: 92957
Diffstat (limited to 'clang/lib/Frontend/RewriteObjC.cpp')
-rw-r--r--clang/lib/Frontend/RewriteObjC.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/RewriteObjC.cpp b/clang/lib/Frontend/RewriteObjC.cpp
index e087cbbcdc3..4245856efa5 100644
--- a/clang/lib/Frontend/RewriteObjC.cpp
+++ b/clang/lib/Frontend/RewriteObjC.cpp
@@ -114,6 +114,7 @@ namespace {
llvm::raw_ostream* OutFile;
bool SilenceRewriteMacroWarning;
+ bool objc_impl_method;
std::string Preamble;
@@ -497,6 +498,7 @@ void RewriteObjC::Initialize(ASTContext &context) {
PropParentMap = 0;
CurrentBody = 0;
DisableReplaceStmt = false;
+ objc_impl_method = false;
// Get the ID and start/end of the main file.
MainFileID = SM->getMainFileID();
@@ -2953,7 +2955,6 @@ void RewriteObjC::RewriteObjCMethodsMetaData(MethodIterator MethodBegin,
std::string &Result) {
if (MethodBegin == MethodEnd) return;
- static bool objc_impl_method = false;
if (!objc_impl_method) {
/* struct _objc_method {
SEL _cmd;
OpenPOWER on IntegriCloud