From: Steve Naroff Date: Wed, 21 Jan 2009 19:24:01 +0000 (+0000) Subject: Add #line to make the Visual Studio compiler happy. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=099da72056954dfc26cdce281cd1a15ac054694b;p=clang Add #line to make the Visual Studio compiler happy. Fixes clang ObjC rewriter: put #line statement at top of rewritten file git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62706 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp index 3c797c5b6d..4524920f5a 100644 --- a/Driver/RewriteObjC.cpp +++ b/Driver/RewriteObjC.cpp @@ -456,10 +456,11 @@ void RewriteObjC::Initialize(ASTContext &context) { Rewrite.setSourceMgr(Context->getSourceManager()); + Preamble = "#line 2\n"; // declaring objc_selector outside the parameter list removes a silly // scope related warning... if (IsHeader) - Preamble = "#pragma once\n"; + Preamble += "#pragma once\n"; Preamble += "struct objc_selector; struct objc_class;\n"; Preamble += "struct __rw_objc_super { struct objc_object *object; "; Preamble += "struct objc_object *superClass; ";