[PATCH] D28989: [X86][MS]Adjacent comments within multi-line inline assembly statement
coby via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 5 02:34:26 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL294120: [X86][MS]Adjacent comments within multi-line inline assembly statement (authored by coby).
Changed prior to commit:
https://reviews.llvm.org/D28989?vs=85276&id=87135#toc
Repository:
rL LLVM
https://reviews.llvm.org/D28989
Files:
cfe/trunk/lib/Parse/ParseStmtAsm.cpp
cfe/trunk/test/CodeGen/ms-inline-asm.c
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() {
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28989.87135.patch
Type: text/x-patch
Size: 1353 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170205/4424f284/attachment.bin>
More information about the cfe-commits
mailing list