[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
Wed Jan 2 22:34:12 PST 2019


kristina created this revision.
kristina added reviewers: echristo, grosbach, bkramer, lebedev.ri.

NFC change to handle it more consistently in line with other errors, though I'd prefer a quick review since I'm not sure if there's a reason it's was written like that.

(Tidying up parts of MCStreamer code before a bigger differential)


Repository:
  rL LLVM

https://reviews.llvm.org/D56245

Files:
  lib/MC/MCStreamer.cpp


Index: lib/MC/MCStreamer.cpp
===================================================================
--- lib/MC/MCStreamer.cpp
+++ lib/MC/MCStreamer.cpp
@@ -881,9 +881,8 @@
 /// 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();
+  llvm_unreachable(
+    "EmitRawText called on an MCStreamer that doesn't support it");
 }
 
 void MCStreamer::EmitRawText(const Twine &T) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56245.179999.patch
Type: text/x-patch
Size: 622 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190103/855507b7/attachment.bin>


More information about the llvm-commits mailing list