[cfe-commits] r54363 - /cfe/trunk/Driver/RewriteObjC.cpp
Steve Naroff
snaroff at apple.com
Tue Aug 5 11:47:53 PDT 2008
Author: snaroff
Date: Tue Aug 5 13:47:23 2008
New Revision: 54363
URL: http://llvm.org/viewvc/llvm-project?rev=54363&view=rev
Log:
Fix <rdar://problem/6108119> clang ObjC rewriter: if no newline at end of input file, rewriter inserts #define on same line as closing brace
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=54363&r1=54362&r2=54363&view=diff
==============================================================================
--- cfe/trunk/Driver/RewriteObjC.cpp (original)
+++ cfe/trunk/Driver/RewriteObjC.cpp Tue Aug 5 13:47:23 2008
@@ -3100,7 +3100,7 @@
RewriteImplementationDecl(CategoryImplementation[i]);
// This is needed for determining instance variable offsets.
- Result += "#define __OFFSETOFIVAR__(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)\n";
+ Result += "\n#define __OFFSETOFIVAR__(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)\n";
// For each implemented class, write out all its meta data.
for (int i = 0; i < ClsDefCount; i++)
RewriteObjCClassMetaData(ClassImplementation[i], Result);
More information about the cfe-commits
mailing list