]> granicus.if.org Git - llvm/commitdiff
[RISCV] Fix two abuses of llvm_unreachable
authorAlex Bradbury <asb@lowrisc.org>
Sun, 20 Aug 2017 06:57:27 +0000 (06:57 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Sun, 20 Aug 2017 06:57:27 +0000 (06:57 +0000)
Replace with report_fatal_error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311276 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp

index be83efc02d27827833052477516605bd09947ba4..4896c38dbb0f4cd7b624901b614495c1eb18b10c 100644 (file)
@@ -51,7 +51,7 @@ public:
   void relaxInstruction(const MCInst &Inst, const MCSubtargetInfo &STI,
                         MCInst &Res) const override {
 
-    llvm_unreachable("RISCVAsmBackend::relaxInstruction() unimplemented");
+    report_fatal_error("RISCVAsmBackend::relaxInstruction() unimplemented");
   }
 
   bool writeNopData(uint64_t Count, MCObjectWriter *OW) const override;
index db8fc5591f41efdc35604a2308fcfd0596e0fb08..93c981e2a2a6c95b6655e235beb9d992fe96db55 100644 (file)
@@ -37,7 +37,7 @@ unsigned RISCVELFObjectWriter::getRelocType(MCContext &Ctx,
                                             const MCValue &Target,
                                             const MCFixup &Fixup,
                                             bool IsPCRel) const {
-  llvm_unreachable("invalid fixup kind!");
+  report_fatal_error("invalid fixup kind!");
 }
 
 MCObjectWriter *llvm::createRISCVELFObjectWriter(raw_pwrite_stream &OS,