aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorKristina Brooks <kristina@nym.hush.com>2019-01-03 18:42:31 +0000
committerKristina Brooks <kristina@nym.hush.com>2019-01-03 18:42:31 +0000
commite434280f3da761ffb1070fda879970037056fac8 (patch)
tree4b0390b07382f9a990dd75697566686a5fe4f2c6 /llvm/lib/MC/MCStreamer.cpp
parent31f0f659a8f46e6bb4c22caf30d6bd5e9b6329ec (diff)
downloadllvm-e434280f3da761ffb1070fda879970037056fac8.zip
llvm-e434280f3da761ffb1070fda879970037056fac8.tar.gz
llvm-e434280f3da761ffb1070fda879970037056fac8.tar.bz2
[MCStreamer] Use report_fatal_error in EmitRawTextImpl
Use report_fatal_error in MCStreamer::EmitRawTextImpl instead of using errs() and explain the rationale behind it not being llvm_unreachable() to save confusion for any future maintainers. Differential Revision: https://reviews.llvm.org/D56245 llvm-svn: 350342
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index 2b2ec40..6a8471b 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -865,13 +865,11 @@ void MCStreamer::EmitWinCFIEndProlog(SMLoc Loc) {
CurFrame->PrologEnd = Label;
}
-void MCStreamer::EmitCOFFSafeSEH(MCSymbol const *Symbol) {
-}
+void MCStreamer::EmitCOFFSafeSEH(MCSymbol const *Symbol) {}
void MCStreamer::EmitCOFFSymbolIndex(MCSymbol const *Symbol) {}
-void MCStreamer::EmitCOFFSectionIndex(MCSymbol const *Symbol) {
-}
+void MCStreamer::EmitCOFFSectionIndex(MCSymbol const *Symbol) {}
void MCStreamer::EmitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset) {}
@@ -881,9 +879,12 @@ void MCStreamer::EmitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset) {}
/// the specified string in the output .s file. This capability is
/// indicated by the hasRawTextSupport() predicate.
void MCStreamer::EmitRawTextImpl(StringRef String) {
- errs() << "EmitRawText called on an MCStreamer that doesn't support it, "
- " something must not be fully mc'ized\n";
- abort();
+ // This is not llvm_unreachable for the sake of out of tree backend
+ // developers who may not have assembly streamers and should serve as a
+ // reminder to not accidentally call EmitRawText in the absence of such.
+ report_fatal_error("EmitRawText called on an MCStreamer that doesn't support "
+ "it (target backend is likely missing an AsmStreamer "
+ "implementation)");
}
void MCStreamer::EmitRawText(const Twine &T) {