[PATCH] D56245: Use llvm_unreachable instead of errs+abort in MCStreamer.cpp (in EmitRawTextImpl). NFC.
Kristina Brooks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 3 10:46:13 PST 2019
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL350342: [MCStreamer] Use report_fatal_error in EmitRawTextImpl (authored by kristina, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D56245?vs=180101&id=180103#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56245/new/
https://reviews.llvm.org/D56245
Files:
llvm/trunk/lib/MC/MCStreamer.cpp
Index: llvm/trunk/lib/MC/MCStreamer.cpp
===================================================================
--- llvm/trunk/lib/MC/MCStreamer.cpp
+++ llvm/trunk/lib/MC/MCStreamer.cpp
@@ -865,13 +865,11 @@
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 @@
/// 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) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56245.180103.patch
Type: text/x-patch
Size: 1458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190103/0e41495b/attachment.bin>
More information about the llvm-commits
mailing list