Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Unified Diff: lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/CodeGen/AsmPrinter/AsmPrinter.cpp ('k') | lib/CodeGen/AsmPrinter/DwarfDebug.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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__
}
« no previous file with comments | « lib/CodeGen/AsmPrinter/AsmPrinter.cpp ('k') | lib/CodeGen/AsmPrinter/DwarfDebug.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698