]> granicus.if.org Git - clang/commitdiff
Remove rewriter dependency on 'nil' macro (used when rewriting for(...))
authorSteve Naroff <snaroff@apple.com>
Wed, 17 Dec 2008 14:24:39 +0000 (14:24 +0000)
committerSteve Naroff <snaroff@apple.com>
Wed, 17 Dec 2008 14:24:39 +0000 (14:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61135 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/RewriteObjC.cpp

index 821529584693c9c83d1a3db43b02374df61ed1bc..bd7b73e31604be9fa03b833b09f4b7d41eda7f61 100644 (file)
@@ -1398,14 +1398,14 @@ Stmt *RewriteObjC::RewriteObjCForCollectionStmt(ObjCForCollectionStmt *S,
   SynthCountByEnumWithState(buf);
   buf += ");\n\t";
   buf += elementName;
-  buf += " = nil;\n\t";
+  buf += " = ((id)0);\n\t";
   buf += "__break_label_";
   buf += utostr(ObjCBcLabelNo.back());
   buf += ": ;\n\t";
   buf += "}\n\t";
   buf += "else\n\t\t";
   buf += elementName;
-  buf += " = nil;\n";
+  buf += " = ((id)0);\n";
   buf += "}\n";
   
   // Insert all these *after* the statement body.