summaryrefslogtreecommitdiff
path: root/lib/MC/MCParser/AsmParser.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-03-06 19:19:12 +0000
committerReid Kleckner <reid@kleckner.net>2014-03-06 19:19:12 +0000
commit9035f6be4cb65c53415593c7bc568c090eca7190 (patch)
treebd55227a8d63b1686884d4165a03b3cc741532fe /lib/MC/MCParser/AsmParser.cpp
parentbbf1c8d24c8c5ec1aa96623457911b97fcd5f3c6 (diff)
downloadllvm-9035f6be4cb65c53415593c7bc568c090eca7190.tar.gz
llvm-9035f6be4cb65c53415593c7bc568c090eca7190.tar.bz2
llvm-9035f6be4cb65c53415593c7bc568c090eca7190.tar.xz
MS asm: The initial dot in struct access is optional
Fixes PR18994. Tests, once again, in that other repository. =P git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203146 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCParser/AsmParser.cpp')
-rw-r--r--lib/MC/MCParser/AsmParser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp
index b068724a95..a53f3699e3 100644
--- a/lib/MC/MCParser/AsmParser.cpp
+++ b/lib/MC/MCParser/AsmParser.cpp
@@ -4583,6 +4583,10 @@ bool AsmParser::parseMSInlineAsm(
break;
}
case AOK_DotOperator:
+ // Insert the dot if the user omitted it.
+ OS.flush();
+ if (AsmStringIR.back() != '.')
+ OS << '.';
OS << (*I).Val;
break;
}