Revert the workaround patch in the last check in. With the local patch to LLVM, it is no longer necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138046 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp b/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
index 03c3989..a027201 100644
--- a/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
+++ b/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
@@ -132,13 +132,6 @@
if (!Str.empty() && Str.back() == c)
Str = Str.substr(0, Str.size()-1);
}
-static inline void RStripNumber(llvm::StringRef &Str)
-{
- while (!Str.empty() && isnumber(Str.back()))
- Str = Str.substr(0, Str.size()-1);
- if (!Str.empty() && Str.back() == '-')
- Str = Str.substr(0, Str.size()-1);
-}
// Aligns the raw disassembly (passed as 'str') with the rest of edis'ed disassembly output.
// This is called from non-raw mode when edis of the current m_inst fails for some reason.
static void
@@ -153,19 +146,6 @@
PadString(s, p.second, operandColWidth);
}
-static bool
-apply_workaround(const char *str)
-{
- llvm::StringRef Str(str);
- StripSpaces(Str);
- if (Str.startswith("mov.w")) {
- RStripNumber(Str);
- if (Str.endswith("#"))
- return true;
- }
- return false;
-}
-
#define AlignPC(pc_val) (pc_val & 0xFFFFFFFC)
void
InstructionLLVM::Dump
@@ -232,16 +212,7 @@
*/
/* .... when we fix the edis for arm/thumb. */
- const char *lookahead;
- bool workaround = false;
- if (EDGetInstString(&lookahead, m_inst)) // 0 on success
- return;
- else if (m_arch_type == llvm::Triple::thumb) {
- if (apply_workaround(lookahead))
- workaround = true;
- }
-
- if (!raw && !workaround)
+ if (!raw)
numTokens = EDNumTokens(m_inst);
int currentOpIndex = -1;