]> granicus.if.org Git - clang/commitdiff
Fix <rdar://problem/6108119> clang ObjC rewriter: if no newline at end of input file...
authorSteve Naroff <snaroff@apple.com>
Tue, 5 Aug 2008 18:47:23 +0000 (18:47 +0000)
committerSteve Naroff <snaroff@apple.com>
Tue, 5 Aug 2008 18:47:23 +0000 (18:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54363 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/RewriteObjC.cpp

index c45430731060a95b765b75e99dd81e38e56193bd..a6e53649740e7b8d67f34d3284045ee482f0a72c 100644 (file)
@@ -3100,7 +3100,7 @@ void RewriteObjC::RewriteImplementations(std::string &Result) {
     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);