]> granicus.if.org Git - clang/commitdiff
[ms-inline asm] Don't emit newlines as these are ignored by the AsmParser
authorChad Rosier <mcrosier@apple.com>
Wed, 15 Aug 2012 19:12:42 +0000 (19:12 +0000)
committerChad Rosier <mcrosier@apple.com>
Wed, 15 Aug 2012 19:12:42 +0000 (19:12 +0000)
anyways.  Also, simplify some conditional logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161977 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaStmt.cpp

index e176e38dc2fad6af8edcc0b860f69f83ad0e15ad..3d58a5d57f663a7fa29294e43c1ef7761bd22db6 100644 (file)
@@ -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()) {