diff options
author | Chad Rosier <mcrosier@apple.com> | 2013-03-19 17:32:17 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2013-03-19 17:32:17 +0000 |
commit | 023c8802203d7f3b433d93233ccee6f8cce9ca5d (patch) | |
tree | 0a4e10bb37427061b2b94ed4a5ee78ab80f0ec8d /lib/MC/MCParser/AsmParser.cpp | |
parent | 7f63f01a4d4301699f25d92481db547c60778ca2 (diff) |
[ms-inline asm] Move the size directive asm rewrite into the target specific
logic as a QOI cleanup.
rdar://13445327
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCParser/AsmParser.cpp')
-rw-r--r-- | lib/MC/MCParser/AsmParser.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index 9d523774e4..8f754a4be9 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/lib/MC/MCParser/AsmParser.cpp @@ -4131,11 +4131,6 @@ AsmParser::parseMSInlineAsm(void *AsmLoc, std::string &AsmString, continue; bool isOutput = (i == 1) && Desc.mayStore(); - if (Operand->isMem() && Operand->needSizeDirective()) - AsmStrRewrites.push_back(AsmRewrite(AOK_SizeDirective, - Operand->getStartLoc(), /*Len*/0, - Operand->getMemSize())); - if (isOutput) { ++InputIdx; OutputDecls.push_back(OpDecl); @@ -4192,15 +4187,13 @@ AsmParser::parseMSInlineAsm(void *AsmLoc, std::string &AsmString, E = AsmStrRewrites.end(); I != E; ++I) { const char *Loc = (*I).Loc.getPointer(); - assert(Loc >= Start && "Expected Loc to be after Start!"); + assert(Loc >= Start && "Expected Loc to be at or after Start!"); unsigned AdditionalSkip = 0; AsmRewriteKind Kind = (*I).Kind; - // Emit everything up to the immediate/expression. If the previous rewrite - // was a size directive, then this has already been done. - if (PrevKind != AOK_SizeDirective) - OS << StringRef(Start, Loc - Start); + // Emit everything up to the immediate/expression. + OS << StringRef(Start, Loc - Start); PrevKind = Kind; // Skip the original expression. @@ -4254,8 +4247,7 @@ AsmParser::parseMSInlineAsm(void *AsmLoc, std::string &AsmString, } // Skip the original expression. - if (Kind != AOK_SizeDirective) - Start = Loc + (*I).Len + AdditionalSkip; + Start = Loc + (*I).Len + AdditionalSkip; } // Emit the remainder of the asm string. |