[Lldb-commits] [lldb] r250874 - Revert r250872 in source/Plugins/Disassembler to fix MSVC builds failures.
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 20 20:25:29 PDT 2015
You can probably put this CL back in, just make sure you #include the
appropriate file from LLVM in the header file.
On Tue, Oct 20, 2015 at 6:44 PM Eugene Zelenko via lldb-commits <
lldb-commits at lists.llvm.org> wrote:
> Author: eugenezelenko
> Date: Tue Oct 20 20:42:15 2015
> New Revision: 250874
>
> URL: http://llvm.org/viewvc/llvm-project?rev=250874&view=rev
> Log:
> Revert r250872 in source/Plugins/Disassembler to fix MSVC builds failures.
>
> Modified:
> lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
> lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
>
> Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=250874&r1=250873&r2=250874&view=diff
>
> ==============================================================================
> --- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
> (original)
> +++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Tue
> Oct 20 20:42:15 2015
> @@ -7,9 +7,8 @@
> //
>
> //===----------------------------------------------------------------------===//
>
> -// C Includes
> -// C++ Includes
> -// Project includes
> +#include "DisassemblerLLVMC.h"
> +
> #include "llvm-c/Disassembler.h"
> #include "llvm/MC/MCAsmInfo.h"
> #include "llvm/MC/MCContext.h"
> @@ -26,8 +25,6 @@
> #include "llvm/Support/TargetSelect.h"
> #include "llvm/ADT/SmallString.h"
>
> -// Other libraries and framework includes
> -#include "DisassemblerLLVMC.h"
>
> #include "lldb/Core/Address.h"
> #include "lldb/Core/DataExtractor.h"
> @@ -61,10 +58,13 @@ public:
> {
> }
>
> - ~InstructionLLVMC() override = default;
> + virtual
> + ~InstructionLLVMC ()
> + {
> + }
>
> - bool
> - DoesBranch() override
> + virtual bool
> + DoesBranch ()
> {
> if (m_does_branch == eLazyBoolCalculate)
> {
> @@ -100,8 +100,8 @@ public:
> return m_does_branch == eLazyBoolYes;
> }
>
> - bool
> - HasDelaySlot() override
> + virtual bool
> + HasDelaySlot ()
> {
> if (m_has_delay_slot == eLazyBoolCalculate)
> {
> @@ -155,10 +155,10 @@ public:
> return llvm_disasm.m_disasm_ap.get();
> }
>
> - size_t
> - Decode(const lldb_private::Disassembler &disassembler,
> - const lldb_private::DataExtractor &data,
> - lldb::offset_t data_offset) override
> + virtual size_t
> + Decode (const lldb_private::Disassembler &disassembler,
> + const lldb_private::DataExtractor &data,
> + lldb::offset_t data_offset)
> {
> // All we have to do is read the opcode which can be easy for some
> // architectures
> @@ -272,8 +272,8 @@ public:
> }
> }
>
> - void
> - CalculateMnemonicOperandsAndComment(const
> lldb_private::ExecutionContext *exe_ctx) override
> + virtual void
> + CalculateMnemonicOperandsAndComment (const
> lldb_private::ExecutionContext *exe_ctx)
> {
> DataExtractor data;
> const AddressClass address_class = GetAddressClass ();
> @@ -452,6 +452,8 @@ protected:
> bool m_using_file_addr;
> };
>
> +
> +
> DisassemblerLLVMC::LLVMCDisassembler::LLVMCDisassembler (const char
> *triple, const char *cpu, const char *features_str, unsigned flavor,
> DisassemblerLLVMC &owner):
> m_is_valid(true)
> {
> @@ -519,6 +521,10 @@ DisassemblerLLVMC::LLVMCDisassembler::LL
> m_is_valid = false;
> }
>
> +DisassemblerLLVMC::LLVMCDisassembler::~LLVMCDisassembler()
> +{
> +}
> +
> uint64_t
> DisassemblerLLVMC::LLVMCDisassembler::GetMCInst (const uint8_t
> *opcode_data,
> size_t opcode_data_len,
> @@ -599,6 +605,7 @@ DisassemblerLLVMC::FlavorValidForArchSpe
> return false;
> }
>
> +
> Disassembler *
> DisassemblerLLVMC::CreateInstance (const ArchSpec &arch, const char
> *flavor)
> {
> @@ -775,6 +782,10 @@ DisassemblerLLVMC::DisassemblerLLVMC (co
> }
> }
>
> +DisassemblerLLVMC::~DisassemblerLLVMC()
> +{
> +}
> +
> size_t
> DisassemblerLLVMC::DecodeInstructions (const Address &base_addr,
> const DataExtractor& data,
>
> Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h?rev=250874&r1=250873&r2=250874&view=diff
>
> ==============================================================================
> --- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
> (original)
> +++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h Tue
> Oct 20 20:42:15 2015
> @@ -10,19 +10,10 @@
> #ifndef liblldb_DisassemblerLLVMC_h_
> #define liblldb_DisassemblerLLVMC_h_
>
> -// C Includes
> -// C++ Includes
> #include <string>
>
> -// Other libraries and framework includes
> #include "llvm-c/Disassembler.h"
>
> -// Project includes
> -#include "lldb/Core/Address.h"
> -#include "lldb/Core/Disassembler.h"
> -#include "lldb/Core/PluginManager.h"
> -#include "lldb/Host/Mutex.h"
> -
> // Opaque references to C++ Objects in LLVM's MC.
> namespace llvm
> {
> @@ -34,7 +25,12 @@ namespace llvm
> class MCInstPrinter;
> class MCAsmInfo;
> class MCSubtargetInfo;
> -} // namespace llvm
> +}
> +
> +#include "lldb/Core/Address.h"
> +#include "lldb/Core/Disassembler.h"
> +#include "lldb/Core/PluginManager.h"
> +#include "lldb/Host/Mutex.h"
>
> class InstructionLLVMC;
>
> @@ -47,7 +43,7 @@ class DisassemblerLLVMC : public lldb_pr
> public:
> LLVMCDisassembler (const char *triple, const char *cpu, const
> char *features_str, unsigned flavor, DisassemblerLLVMC &owner);
>
> - ~LLVMCDisassembler() = default;
> + ~LLVMCDisassembler();
>
> uint64_t GetMCInst (const uint8_t *opcode_data, size_t
> opcode_data_len, lldb::addr_t pc, llvm::MCInst &mc_inst);
> uint64_t PrintMCInst (llvm::MCInst &mc_inst, char *output_buffer,
> size_t out_buffer_len);
> @@ -71,10 +67,6 @@ class DisassemblerLLVMC : public lldb_pr
> };
>
> public:
> - DisassemblerLLVMC(const lldb_private::ArchSpec &arch, const char
> *flavor /* = NULL */);
> -
> - ~DisassemblerLLVMC() override = default;
> -
> //------------------------------------------------------------------
> // Static Functions
> //------------------------------------------------------------------
> @@ -90,28 +82,33 @@ public:
> static lldb_private::Disassembler *
> CreateInstance(const lldb_private::ArchSpec &arch, const char
> *flavor);
>
> - size_t
> - DecodeInstructions(const lldb_private::Address &base_addr,
> - const lldb_private::DataExtractor& data,
> - lldb::offset_t data_offset,
> - size_t num_instructions,
> - bool append,
> - bool data_from_file) override;
> + DisassemblerLLVMC(const lldb_private::ArchSpec &arch, const char
> *flavor /* = NULL */);
> +
> + virtual
> + ~DisassemblerLLVMC();
> +
> + virtual size_t
> + DecodeInstructions (const lldb_private::Address &base_addr,
> + const lldb_private::DataExtractor& data,
> + lldb::offset_t data_offset,
> + size_t num_instructions,
> + bool append,
> + bool data_from_file);
>
> //------------------------------------------------------------------
> // PluginInterface protocol
> //------------------------------------------------------------------
> - lldb_private::ConstString
> - GetPluginName() override;
> + virtual lldb_private::ConstString
> + GetPluginName();
>
> - uint32_t
> - GetPluginVersion() override;
> + virtual uint32_t
> + GetPluginVersion();
>
> protected:
> friend class InstructionLLVMC;
>
> - bool
> - FlavorValidForArchSpec(const lldb_private::ArchSpec &arch, const char
> *flavor) override;
> + virtual bool
> + FlavorValidForArchSpec (const lldb_private::ArchSpec &arch, const
> char *flavor);
>
> bool
> IsValid()
> @@ -167,4 +164,4 @@ protected:
> std::unique_ptr<LLVMCDisassembler> m_alternate_disasm_ap;
> };
>
> -#endif // liblldb_DisassemblerLLVM_h_
> +#endif // liblldb_DisassemblerLLVM_h_
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151021/3ccbb3fe/attachment-0001.html>
More information about the lldb-commits
mailing list