From: Chad Rosier Date: Wed, 15 Aug 2012 19:12:42 +0000 (+0000) Subject: [ms-inline asm] Don't emit newlines as these are ignored by the AsmParser X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a8ac203967adaa18c5cbf869e368f7103060be1a;p=clang [ms-inline asm] Don't emit newlines as these are ignored by the AsmParser anyways. Also, simplify some conditional logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161977 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index e176e38dc2..3d58a5d57f 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -2778,11 +2778,8 @@ static void patchMSAsmStrings(Sema &SemaRef, bool &IsSimple, for (unsigned i = 0, e = AsmToks.size(); i != e; ++i) { // Emit the previous asm string. - if (i != 0 && AsmToks[i].isAtStartOfLine()) - AsmStrings[NumAsmStrings++] = Asm.c_str(); - if (i && AsmToks[i].isAtStartOfLine()) - Asm += '\n'; + AsmStrings[NumAsmStrings++] = Asm.c_str(); // Start a new asm string with the opcode. if (i == 0 || AsmToks[i].isAtStartOfLine()) {