This is an archive of the discontinued LLVM Phabricator instance.

[MC] Implement EmitRawText in MCNullStreamer
ClosedPublic

Authored by eush on Oct 31 2018, 9:40 AM.

Details

Summary

This adds dummy implementation of EmitRawText in MCNullStreamer.

This fixes the behavior of AsmPrinter with MCNullStreamer on targets
on which no integrated assembler is used. An attempt to emit inline asm
on such a target would previously lead to a crash, since AsmPrinter does not
check for hasRawTextSupport in EmitInlineAsm and calls EmitRawText
anyway if integrated assembler is disabled (the behavior has changed
in D2686).

Error message printed by MCStreamer:

EmitRawText called on an MCStreamer that doesn't support it, something
must not be fully mc'ized

Patch by Eugene Sharygin

Diff Detail

Event Timeline

eush created this revision.Oct 31 2018, 9:40 AM
dsanders accepted this revision.Oct 31 2018, 10:22 AM

LGTM. It makes sense to me that MCNullStreamer supports raw text by not emitting anything.

This revision is now accepted and ready to land.Oct 31 2018, 10:22 AM
eush added a comment.Nov 1 2018, 8:05 AM

Could you commit this patch on my behalf?

dsanders edited the summary of this revision. (Show Details)Nov 1 2018, 8:27 AM
This revision was automatically updated to reflect the committed changes.

Could you commit this patch on my behalf?

Sure. It's r345841