| Index: lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
|
| diff --git a/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp b/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
|
| index cca5f229c2fc5f1cc8e9ea51574fc0aa03b2897d..45711b4500fde801fa121552f0604a4b2406deee 100644
|
| --- a/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
|
| +++ b/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
|
| @@ -74,6 +74,11 @@ static void srcMgrDiagHandler(const SMDiagnostic &Diag, void *diagInfo) {
|
| /// EmitInlineAsm - Emit a blob of inline asm to the output streamer.
|
| void AsmPrinter::EmitInlineAsm(StringRef Str, const MDNode *LocMDNode,
|
| InlineAsm::AsmDialect Dialect) const {
|
| +#if defined(__native_client__)
|
| + // Prune the generic AsmParser bits from the in-browser translator.
|
| + // This is normally used to parse inline asm (see createMCAsmParser below).
|
| + return;
|
| +#else
|
| assert(!Str.empty() && "Can't emit empty inline asm block");
|
|
|
| // Remember if the buffer is nul terminated or not so we can avoid a copy.
|
| @@ -158,6 +163,7 @@ void AsmPrinter::EmitInlineAsm(StringRef Str, const MDNode *LocMDNode,
|
| emitInlineAsmEnd(STIOrig, STI.get());
|
| if (Res && !HasDiagHandler)
|
| report_fatal_error("Error parsing inline asm\n");
|
| +#endif // defined(__native_client__)
|
| }
|
|
|
| static void EmitMSInlineAsmStr(const char *AsmStr, const MachineInstr *MI,
|
| @@ -434,6 +440,10 @@ static void EmitGCCInlineAsmStr(const char *AsmStr, const MachineInstr *MI,
|
| /// EmitInlineAsm - This method formats and emits the specified machine
|
| /// instruction that is an inline asm.
|
| void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const {
|
| +#if defined(__native__client__)
|
| + // See above LOCALMOD for pruning generic AsmParsing.
|
| + return;
|
| +#else
|
| assert(MI->isInlineAsm() && "printInlineAsm only works on inline asms");
|
|
|
| // Count the number of register definitions to find the asm string.
|
| @@ -494,6 +504,7 @@ void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const {
|
| // Emit the #NOAPP end marker. This has to happen even if verbose-asm isn't
|
| // enabled, so we use emitRawComment.
|
| OutStreamer.emitRawComment(MAI->getInlineAsmEnd());
|
| +#endif // __native_client__
|
| }
|
|
|
|
|
|
|