diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-09-10 21:10:49 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-09-10 21:10:49 +0000 |
commit | db20a41d991c3471968cd26cf9017e811380ba31 (patch) | |
tree | 3679c138439f719af6a0936fd7254daef6092ef3 /llvm/lib/CodeGen | |
parent | 6b152ff550e68f09719985258e7fa4dc1bfe482e (diff) | |
download | bcm5719-llvm-db20a41d991c3471968cd26cf9017e811380ba31.tar.gz bcm5719-llvm-db20a41d991c3471968cd26cf9017e811380ba31.zip |
[ms-inline asm] Pass the correct AsmVariant to the PrintAsmOperand() function
and update the printOperand() function accordingly.
llvm-svn: 163544
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp index b0818fe6b4d..2dfb73e300e 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp @@ -199,7 +199,8 @@ void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const { // The variant of the current asmprinter. int AsmPrinterVariant = MAI->getAssemblerDialect(); - + int InlineAsmVariant = MI->getInlineAsmDialect(); + int CurVariant = -1; // The number of the {.|.|.} region we are in. const char *LastEmitted = AsmStr; // One past the last character emitted. @@ -344,11 +345,11 @@ void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const { else { AsmPrinter *AP = const_cast<AsmPrinter*>(this); if (InlineAsm::isMemKind(OpFlags)) { - Error = AP->PrintAsmMemoryOperand(MI, OpNo, AsmPrinterVariant, + Error = AP->PrintAsmMemoryOperand(MI, OpNo, InlineAsmVariant, Modifier[0] ? Modifier : 0, OS); } else { - Error = AP->PrintAsmOperand(MI, OpNo, AsmPrinterVariant, + Error = AP->PrintAsmOperand(MI, OpNo, InlineAsmVariant, Modifier[0] ? Modifier : 0, OS); } } |