Index: cfe/trunk/lib/Parse/ParseStmtAsm.cpp =================================================================== --- cfe/trunk/lib/Parse/ParseStmtAsm.cpp +++ cfe/trunk/lib/Parse/ParseStmtAsm.cpp @@ -457,6 +457,11 @@ break; LineNo = SrcMgr.getLineNumber(ExpLoc.first, ExpLoc.second); SkippedStartOfLine = Tok.isAtStartOfLine(); + } else if (Tok.is(tok::semi)) { + // A multi-line asm-statement, where next line is a comment + InAsmComment = true; + FID = ExpLoc.first; + LineNo = SrcMgr.getLineNumber(FID, ExpLoc.second); } } else if (!InAsmComment && Tok.is(tok::r_brace)) { // In MSVC mode, braces only participate in brace matching and Index: cfe/trunk/test/CodeGen/ms-inline-asm.c =================================================================== --- cfe/trunk/test/CodeGen/ms-inline-asm.c +++ cfe/trunk/test/CodeGen/ms-inline-asm.c @@ -55,9 +55,15 @@ } } __asm {} + __asm { + ; + ; label + mov eax, ebx + } // CHECK: t7 // CHECK: call void asm sideeffect inteldialect "int $$0x2cU", "~{dirflag},~{fpsr},~{flags}"() // CHECK: call void asm sideeffect inteldialect "", "~{dirflag},~{fpsr},~{flags}"() +// CHECK: call void asm sideeffect inteldialect "mov eax, ebx", "~{eax},~{dirflag},~{fpsr},~{flags}"() } int t8() {