summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-08-19 17:31:59 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-08-19 17:31:59 +0000
commitaeaf436e3e47d8b63f98d56de3dea360cd09b263 (patch)
tree7ffc75445cce525edf12d38c400117b5932945c0 /lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
parent4c35b711dab6bc59bc14d07d821e60d69f4dc192 (diff)
downloadbcm5719-llvm-aeaf436e3e47d8b63f98d56de3dea360cd09b263.tar.gz
bcm5719-llvm-aeaf436e3e47d8b63f98d56de3dea360cd09b263.zip
Revert the workaround patch in the last check in. With the local patch to LLVM, it is no longer necessary.
llvm-svn: 138046
Diffstat (limited to 'lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp')
-rw-r--r--lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp31
1 files changed, 1 insertions, 30 deletions
diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
index 03c39898430..a027201f6b8 100644
--- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
+++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
@@ -132,13 +132,6 @@ static inline void RStrip(llvm::StringRef &Str, char c)
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 @@ Align(Stream *s, const char *str, size_t opcodeColWidth, size_t operandColWidth)
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 @@ InstructionLLVM::Dump
*/
/* .... 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;
OpenPOWER on IntegriCloud