forked from OSchip/llvm-project
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:
parent
67c37d1127
commit
568bbf73b2
|
@ -3100,7 +3100,7 @@ void RewriteObjC::RewriteImplementations(std::string &Result) {
|
||||||
RewriteImplementationDecl(CategoryImplementation[i]);
|
RewriteImplementationDecl(CategoryImplementation[i]);
|
||||||
|
|
||||||
// This is needed for determining instance variable offsets.
|
// 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 each implemented class, write out all its meta data.
|
||||||
for (int i = 0; i < ClsDefCount; i++)
|
for (int i = 0; i < ClsDefCount; i++)
|
||||||
RewriteObjCClassMetaData(ClassImplementation[i], Result);
|
RewriteObjCClassMetaData(ClassImplementation[i], Result);
|
||||||
|
|
Loading…
Reference in New Issue