[llvm] r311276 - [RISCV] Fix two abuses of llvm_unreachable
Alex Bradbury via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 19 23:57:27 PDT 2017
Author: asb
Date: Sat Aug 19 23:57:27 2017
New Revision: 311276
URL: http://llvm.org/viewvc/llvm-project?rev=311276&view=rev
Log:
[RISCV] Fix two abuses of llvm_unreachable
Replace with report_fatal_error.
Modified:
llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
Modified: llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp?rev=311276&r1=311275&r2=311276&view=diff
==============================================================================
--- llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp Sat Aug 19 23:57:27 2017
@@ -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;
Modified: llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp?rev=311276&r1=311275&r2=311276&view=diff
==============================================================================
--- llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp Sat Aug 19 23:57:27 2017
@@ -37,7 +37,7 @@ unsigned RISCVELFObjectWriter::getRelocT
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,
More information about the llvm-commits
mailing list