Fixes a bug where we were rewriting two definitions of

_objc_method (part of radar 7490408).

llvm-svn: 92957
This commit is contained in:
Fariborz Jahanian 2010-01-07 22:51:18 +00:00
parent a52cf2ca3f
commit bc6811c32e
1 changed files with 2 additions and 1 deletions

View 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;