]> granicus.if.org Git - clang/commitdiff
Fixes a bug where we were rewriting two definitions of
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 7 Jan 2010 22:51:18 +0000 (22:51 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 7 Jan 2010 22:51:18 +0000 (22:51 +0000)
_objc_method (part of radar 7490408).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92957 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/RewriteObjC.cpp

index e087cbbcdc39e57afd501ee9feea5d09eb7ac015..4245856efa537a51128934c08348bdec2449e430 100644 (file)
@@ -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;