Fix <rdar://problem/6108119> clang ObjC rewriter: if no newline at end of input file, rewriter inserts #define on same line as closing brace

llvm-svn: 54363
This commit is contained in:
Steve Naroff 2008-08-05 18:47:23 +00:00
parent 67c37d1127
commit 568bbf73b2
1 changed files with 1 additions and 1 deletions

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