diff options
author | James Y Knight <jyknight@google.com> | 2022-10-28 18:38:49 -0400 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2022-10-28 19:45:20 -0400 |
commit | 9a26f8931657be611b0111e604610ac967aa5b62 (patch) | |
tree | 9caf6affb6f07a7c80efc4453ad7389eb77de3b6 /llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp | |
parent | 63baab8b390e1c30fd7e2770fb40a99d0b05fe8d (diff) | |
download | llvm-9a26f8931657be611b0111e604610ac967aa5b62.zip llvm-9a26f8931657be611b0111e604610ac967aa5b62.tar.gz llvm-9a26f8931657be611b0111e604610ac967aa5b62.tar.bz2 |
[llvm-tblgen] NFC: Simplify DecoderEmitter.
Currently the DecoderEmitter constructor takes a bunch of string
parameters containing bits of code to interpolate.
However, there's only two ways it can be called. The one used for most
targets which doesn't handle the SoftFail DecoderStatus (not a
problem, because they don't use SoftFail). The other mode, which is
used for ARM/AArch64, does handle SoftFail, but requires an externally
defined helper function in those targets.
This is unnecessary complication; remove the parameters, and unify
onto a single version which does support SoftFail, defining the helper
itself.
Diffstat (limited to 'llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp b/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp index 8169be4..cb2a0c4 100644 --- a/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp +++ b/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp @@ -165,21 +165,6 @@ private: } // end anonymous namespace -static bool Check(DecodeStatus &Out, DecodeStatus In) { - switch (In) { - case MCDisassembler::Success: - // Out stays the same. - return true; - case MCDisassembler::SoftFail: - Out = In; - return true; - case MCDisassembler::Fail: - Out = In; - return false; - } - llvm_unreachable("Invalid DecodeStatus!"); -} - // Forward declare these because the autogenerated code will reference them. // Definitions are further down. static DecodeStatus DecodeGPRRegisterClass(MCInst &Inst, unsigned RegNo, |