summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Disassembler/llvm
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-01-19 03:24:53 +0000
committerGreg Clayton <gclayton@apple.com>2012-01-19 03:24:53 +0000
commite42ae8497f1863087e32f3325f46d02960f9b5c2 (patch)
treea80b7c06712aa7ffdcf5bd3fdfe6167966ee2ed3 /lldb/source/Plugins/Disassembler/llvm
parent235c8d2d94022a0bcff5b0888abb12a407210154 (diff)
downloadbcm5719-llvm-e42ae8497f1863087e32f3325f46d02960f9b5c2.tar.gz
bcm5719-llvm-e42ae8497f1863087e32f3325f46d02960f9b5c2.zip
Fixed an issue with the Instruction subclasses where the strings might
be fetched too many times and the DisassemblerLLVM was appending to strings when the opcode, mnemonic and comment accessors were called multiple times and if any of the strings were empty. Also fixed the test suite failures from recent Objective C modifications. llvm-svn: 148460
Diffstat (limited to 'lldb/source/Plugins/Disassembler/llvm')
-rw-r--r--lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp16
-rw-r--r--lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.h8
2 files changed, 2 insertions, 22 deletions
diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
index 8544be7c9f8..e395cccfad8 100644
--- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
+++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
@@ -437,7 +437,7 @@ InstructionLLVM::Dump
}
void
-InstructionLLVM::CalculateMnemonic (ExecutionContextScope *exe_scope)
+InstructionLLVM::CalculateMnemonicOperandsAndComment (ExecutionContextScope *exe_scope)
{
const int num_tokens = EDNumTokens(m_inst);
if (num_tokens > 0)
@@ -560,20 +560,6 @@ InstructionLLVM::CalculateMnemonic (ExecutionContextScope *exe_scope)
}
}
-void
-InstructionLLVM::CalculateOperands(ExecutionContextScope *exe_scope)
-{
- // Do all of the work in CalculateMnemonic()
- CalculateMnemonic (exe_scope);
-}
-
-void
-InstructionLLVM::CalculateComment(ExecutionContextScope *exe_scope)
-{
- // Do all of the work in CalculateMnemonic()
- CalculateMnemonic (exe_scope);
-}
-
bool
InstructionLLVM::DoesBranch() const
{
diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.h b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.h
index 73a117d4f40..7e3af766892 100644
--- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.h
+++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.h
@@ -44,14 +44,8 @@ public:
uint32_t data_offset);
virtual void
- CalculateMnemonic (lldb_private::ExecutionContextScope *exe_scope);
+ CalculateMnemonicOperandsAndComment (lldb_private::ExecutionContextScope *exe_scope);
- virtual void
- CalculateOperands (lldb_private::ExecutionContextScope *exe_scope);
-
- virtual void
- CalculateComment (lldb_private::ExecutionContextScope *exe_scope);
-
protected:
EDDisassemblerRef m_disassembler;
EDInstRef m_inst;
OpenPOWER on IntegriCloud