aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCStreamer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/MC/MCStreamer.h')
-rw-r--r--include/llvm/MC/MCStreamer.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h
index bdcfdb2debee..4667c41d6235 100644
--- a/include/llvm/MC/MCStreamer.h
+++ b/include/llvm/MC/MCStreamer.h
@@ -62,9 +62,13 @@ class TargetAsmBackend;
/// @name Assembly File Formatting.
/// @{
- /// isVerboseAsm - Return true if this streamer supports verbose assembly at
- /// all.
+ /// isVerboseAsm - Return true if this streamer supports verbose assembly
+ /// and if it is enabled.
virtual bool isVerboseAsm() const { return false; }
+
+ /// hasRawTextSupport - Return true if this asm streamer supports emitting
+ /// unformatted text to the .s file with EmitRawText.
+ virtual bool hasRawTextSupport() const { return false; }
/// AddComment - Add a comment that can be emitted to the generated .s
/// file if applicable as a QoI issue to make the output of the compiler
@@ -278,6 +282,12 @@ class TargetAsmBackend;
/// section.
virtual void EmitInstruction(const MCInst &Inst) = 0;
+ /// EmitRawText - If this file is backed by a assembly streamer, this dumps
+ /// the specified string in the output .s file. This capability is
+ /// indicated by the hasRawTextSupport() predicate. By default this aborts.
+ virtual void EmitRawText(StringRef String);
+ void EmitRawText(const Twine &String);
+
/// Finish - Finish emission of machine code and flush any output.
virtual void Finish() = 0;
};