aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-08-05 18:47:23 +0000
committerSteve Naroff <snaroff@apple.com>2008-08-05 18:47:23 +0000
commita11440b68a02d54cd9c4b54160b0e339e0f30754 (patch)
tree2f766024ef3e339512234599dabe080f3e0af116
parent914701ed49f31323176a784b49df05a0d177d1ad (diff)
Fix <rdar://problem/6108119> clang ObjC rewriter: if no newline at end of input file, rewriter inserts #define on same line as closing brace
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54363 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Driver/RewriteObjC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp
index c454307310..a6e5364974 100644
--- a/Driver/RewriteObjC.cpp
+++ b/Driver/RewriteObjC.cpp
@@ -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);