llvm.org GIT mirror llvm / b6242a8
Reflect the MC/MCDisassembler split on the include/ level. No functional change, just moving code around. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258818 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 3 years ago
35 changed file(s) with 353 addition(s) and 353 deletion(s). Raw diff Collapse all Expand all
0 //===-- llvm/MC/MCDisassembler.h - Disassembler interface -------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 #ifndef LLVM_MC_MCDISASSEMBLER_MCDISASSEMBLER_H
9 #define LLVM_MC_MCDISASSEMBLER_MCDISASSEMBLER_H
10
11 #include "llvm-c/Disassembler.h"
12 #include "llvm/ADT/ArrayRef.h"
13 #include "llvm/MC/MCDisassembler/MCSymbolizer.h"
14 #include "llvm/Support/DataTypes.h"
15
16 namespace llvm {
17
18 class MCInst;
19 class MCSubtargetInfo;
20 class raw_ostream;
21 class MCContext;
22
23 /// Superclass for all disassemblers. Consumes a memory region and provides an
24 /// array of assembly instructions.
25 class MCDisassembler {
26 public:
27 /// Ternary decode status. Most backends will just use Fail and
28 /// Success, however some have a concept of an instruction with
29 /// understandable semantics but which is architecturally
30 /// incorrect. An example of this is ARM UNPREDICTABLE instructions
31 /// which are disassemblable but cause undefined behaviour.
32 ///
33 /// Because it makes sense to disassemble these instructions, there
34 /// is a "soft fail" failure mode that indicates the MCInst& is
35 /// valid but architecturally incorrect.
36 ///
37 /// The enum numbers are deliberately chosen such that reduction
38 /// from Success->SoftFail ->Fail can be done with a simple
39 /// bitwise-AND:
40 ///
41 /// LEFT & TOP = | Success Unpredictable Fail
42 /// --------------+-----------------------------------
43 /// Success | Success Unpredictable Fail
44 /// Unpredictable | Unpredictable Unpredictable Fail
45 /// Fail | Fail Fail Fail
46 ///
47 /// An easy way of encoding this is as 0b11, 0b01, 0b00 for
48 /// Success, SoftFail, Fail respectively.
49 enum DecodeStatus {
50 Fail = 0,
51 SoftFail = 1,
52 Success = 3
53 };
54
55 MCDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx)
56 : Ctx(Ctx), STI(STI), Symbolizer(), CommentStream(nullptr) {}
57
58 virtual ~MCDisassembler();
59
60 /// Returns the disassembly of a single instruction.
61 ///
62 /// \param Instr - An MCInst to populate with the contents of the
63 /// instruction.
64 /// \param Size - A value to populate with the size of the instruction, or
65 /// the number of bytes consumed while attempting to decode
66 /// an invalid instruction.
67 /// \param Address - The address, in the memory space of region, of the first
68 /// byte of the instruction.
69 /// \param VStream - The stream to print warnings and diagnostic messages on.
70 /// \param CStream - The stream to print comments and annotations on.
71 /// \return - MCDisassembler::Success if the instruction is valid,
72 /// MCDisassembler::SoftFail if the instruction was
73 /// disassemblable but invalid,
74 /// MCDisassembler::Fail if the instruction was invalid.
75 virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
76 ArrayRef Bytes, uint64_t Address,
77 raw_ostream &VStream,
78 raw_ostream &CStream) const = 0;
79
80 private:
81 MCContext &Ctx;
82
83 protected:
84 // Subtarget information, for instruction decoding predicates if required.
85 const MCSubtargetInfo &STI;
86 std::unique_ptr Symbolizer;
87
88 public:
89 // Helpers around MCSymbolizer
90 bool tryAddingSymbolicOperand(MCInst &Inst,
91 int64_t Value,
92 uint64_t Address, bool IsBranch,
93 uint64_t Offset, uint64_t InstSize) const;
94
95 void tryAddingPcLoadReferenceComment(int64_t Value, uint64_t Address) const;
96
97 /// Set \p Symzer as the current symbolizer.
98 /// This takes ownership of \p Symzer, and deletes the previously set one.
99 void setSymbolizer(std::unique_ptr Symzer);
100
101 MCContext& getContext() const { return Ctx; }
102
103 const MCSubtargetInfo& getSubtargetInfo() const { return STI; }
104
105 // Marked mutable because we cache it inside the disassembler, rather than
106 // having to pass it around as an argument through all the autogenerated code.
107 mutable raw_ostream *CommentStream;
108 };
109
110 } // namespace llvm
111
112 #endif
0 //===-- llvm/MC/MCExternalSymbolizer.h - ------------------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the MCExternalSymbolizer class, which
10 // enables library users to provide callbacks (through the C API) to do the
11 // symbolization externally.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_MC_MCDISASSEMBLER_MCEXTERNALSYMBOLIZER_H
16 #define LLVM_MC_MCDISASSEMBLER_MCEXTERNALSYMBOLIZER_H
17
18 #include "llvm-c/Disassembler.h"
19 #include "llvm/MC/MCDisassembler/MCSymbolizer.h"
20 #include
21
22 namespace llvm {
23
24 /// \brief Symbolize using user-provided, C API, callbacks.
25 ///
26 /// See llvm-c/Disassembler.h.
27 class MCExternalSymbolizer : public MCSymbolizer {
28 protected:
29 /// \name Hooks for symbolic disassembly via the public 'C' interface.
30 /// @{
31 /// The function to get the symbolic information for operands.
32 LLVMOpInfoCallback GetOpInfo;
33 /// The function to lookup a symbol name.
34 LLVMSymbolLookupCallback SymbolLookUp;
35 /// The pointer to the block of symbolic information for above call back.
36 void *DisInfo;
37 /// @}
38
39 public:
40 MCExternalSymbolizer(MCContext &Ctx,
41 std::unique_ptr RelInfo,
42 LLVMOpInfoCallback getOpInfo,
43 LLVMSymbolLookupCallback symbolLookUp, void *disInfo)
44 : MCSymbolizer(Ctx, std::move(RelInfo)), GetOpInfo(getOpInfo),
45 SymbolLookUp(symbolLookUp), DisInfo(disInfo) {}
46
47 bool tryAddingSymbolicOperand(MCInst &MI, raw_ostream &CommentStream,
48 int64_t Value, uint64_t Address, bool IsBranch,
49 uint64_t Offset, uint64_t InstSize) override;
50 void tryAddingPcLoadReferenceComment(raw_ostream &CommentStream,
51 int64_t Value,
52 uint64_t Address) override;
53 };
54
55 }
56
57 #endif
0 //==-- llvm/MC/MCRelocationInfo.h --------------------------------*- C++ -*-==//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the MCRelocationInfo class, which provides methods to
10 // create MCExprs from relocations, either found in an object::ObjectFile
11 // (object::RelocationRef), or provided through the C API.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_MC_MCDISASSEMBLER_MCRELOCATIONINFO_H
16 #define LLVM_MC_MCDISASSEMBLER_MCRELOCATIONINFO_H
17
18 #include "llvm/Support/Compiler.h"
19
20 namespace llvm {
21
22 namespace object {
23 class RelocationRef;
24 }
25 class MCExpr;
26 class MCContext;
27
28 /// \brief Create MCExprs from relocations found in an object file.
29 class MCRelocationInfo {
30 MCRelocationInfo(const MCRelocationInfo &) = delete;
31 void operator=(const MCRelocationInfo &) = delete;
32
33 protected:
34 MCContext &Ctx;
35
36 public:
37 MCRelocationInfo(MCContext &Ctx);
38 virtual ~MCRelocationInfo();
39
40 /// \brief Create an MCExpr for the target-specific \p VariantKind.
41 /// The VariantKinds are defined in llvm-c/Disassembler.h.
42 /// Used by MCExternalSymbolizer.
43 /// \returns If possible, an MCExpr corresponding to VariantKind, else 0.
44 virtual const MCExpr *createExprForCAPIVariantKind(const MCExpr *SubExpr,
45 unsigned VariantKind);
46 };
47
48 }
49
50 #endif
0 //===-- llvm/MC/MCSymbolizer.h - MCSymbolizer class -------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the MCSymbolizer class, which is used
10 // to symbolize instructions decoded from an object, that is, transform their
11 // immediate operands to MCExprs.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_MC_MCDISASSEMBLER_MCSYMBOLIZER_H
16 #define LLVM_MC_MCDISASSEMBLER_MCSYMBOLIZER_H
17
18 #include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
19 #include "llvm/Support/Compiler.h"
20 #include "llvm/Support/DataTypes.h"
21 #include
22 #include
23
24 namespace llvm {
25
26 class MCContext;
27 class MCInst;
28 class raw_ostream;
29
30 /// \brief Symbolize and annotate disassembled instructions.
31 ///
32 /// For now this mimics the old symbolization logic (from both ARM and x86), that
33 /// relied on user-provided (C API) callbacks to do the actual symbol lookup in
34 /// the object file. This was moved to MCExternalSymbolizer.
35 /// A better API would not rely on actually calling the two methods here from
36 /// inside each disassembler, but would use the instr info to determine what
37 /// operands are actually symbolizable, and in what way. I don't think this
38 /// information exists right now.
39 class MCSymbolizer {
40 MCSymbolizer(const MCSymbolizer &) = delete;
41 void operator=(const MCSymbolizer &) = delete;
42
43 protected:
44 MCContext &Ctx;
45 std::unique_ptr RelInfo;
46
47 public:
48 /// \brief Construct an MCSymbolizer, taking ownership of \p RelInfo.
49 MCSymbolizer(MCContext &Ctx, std::unique_ptr RelInfo)
50 : Ctx(Ctx), RelInfo(std::move(RelInfo)) {
51 }
52
53 virtual ~MCSymbolizer();
54
55 /// \brief Try to add a symbolic operand instead of \p Value to the MCInst.
56 ///
57 /// Instead of having a difficult to read immediate, a symbolic operand would
58 /// represent this immediate in a more understandable way, for instance as a
59 /// symbol or an offset from a symbol. Relocations can also be used to enrich
60 /// the symbolic expression.
61 /// \param Inst - The MCInst where to insert the symbolic operand.
62 /// \param cStream - Stream to print comments and annotations on.
63 /// \param Value - Operand value, pc-adjusted by the caller if necessary.
64 /// \param Address - Load address of the instruction.
65 /// \param IsBranch - Is the instruction a branch?
66 /// \param Offset - Byte offset of the operand inside the inst.
67 /// \param InstSize - Size of the instruction in bytes.
68 /// \return Whether a symbolic operand was added.
69 virtual bool tryAddingSymbolicOperand(MCInst &Inst, raw_ostream &cStream,
70 int64_t Value, uint64_t Address,
71 bool IsBranch, uint64_t Offset,
72 uint64_t InstSize) = 0;
73
74 /// \brief Try to add a comment on the PC-relative load.
75 /// For instance, in Mach-O, this is used to add annotations to instructions
76 /// that use C string literals, as found in __cstring.
77 virtual void tryAddingPcLoadReferenceComment(raw_ostream &cStream,
78 int64_t Value,
79 uint64_t Address) = 0;
80 };
81
82 }
83
84 #endif
+0
-113
include/llvm/MC/MCDisassembler.h less more
None //===-- llvm/MC/MCDisassembler.h - Disassembler interface -------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 #ifndef LLVM_MC_MCDISASSEMBLER_H
9 #define LLVM_MC_MCDISASSEMBLER_H
10
11 #include "llvm-c/Disassembler.h"
12 #include "llvm/ADT/ArrayRef.h"
13 #include "llvm/MC/MCSymbolizer.h"
14 #include "llvm/Support/DataTypes.h"
15
16 namespace llvm {
17
18 class MCInst;
19 class MCSubtargetInfo;
20 class raw_ostream;
21 class MCContext;
22
23 /// Superclass for all disassemblers. Consumes a memory region and provides an
24 /// array of assembly instructions.
25 class MCDisassembler {
26 public:
27 /// Ternary decode status. Most backends will just use Fail and
28 /// Success, however some have a concept of an instruction with
29 /// understandable semantics but which is architecturally
30 /// incorrect. An example of this is ARM UNPREDICTABLE instructions
31 /// which are disassemblable but cause undefined behaviour.
32 ///
33 /// Because it makes sense to disassemble these instructions, there
34 /// is a "soft fail" failure mode that indicates the MCInst& is
35 /// valid but architecturally incorrect.
36 ///
37 /// The enum numbers are deliberately chosen such that reduction
38 /// from Success->SoftFail ->Fail can be done with a simple
39 /// bitwise-AND:
40 ///
41 /// LEFT & TOP = | Success Unpredictable Fail
42 /// --------------+-----------------------------------
43 /// Success | Success Unpredictable Fail
44 /// Unpredictable | Unpredictable Unpredictable Fail
45 /// Fail | Fail Fail Fail
46 ///
47 /// An easy way of encoding this is as 0b11, 0b01, 0b00 for
48 /// Success, SoftFail, Fail respectively.
49 enum DecodeStatus {
50 Fail = 0,
51 SoftFail = 1,
52 Success = 3
53 };
54
55 MCDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx)
56 : Ctx(Ctx), STI(STI), Symbolizer(), CommentStream(nullptr) {}
57
58 virtual ~MCDisassembler();
59
60 /// Returns the disassembly of a single instruction.
61 ///
62 /// \param Instr - An MCInst to populate with the contents of the
63 /// instruction.
64 /// \param Size - A value to populate with the size of the instruction, or
65 /// the number of bytes consumed while attempting to decode
66 /// an invalid instruction.
67 /// \param Address - The address, in the memory space of region, of the first
68 /// byte of the instruction.
69 /// \param VStream - The stream to print warnings and diagnostic messages on.
70 /// \param CStream - The stream to print comments and annotations on.
71 /// \return - MCDisassembler::Success if the instruction is valid,
72 /// MCDisassembler::SoftFail if the instruction was
73 /// disassemblable but invalid,
74 /// MCDisassembler::Fail if the instruction was invalid.
75 virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
76 ArrayRef Bytes, uint64_t Address,
77 raw_ostream &VStream,
78 raw_ostream &CStream) const = 0;
79
80 private:
81 MCContext &Ctx;
82
83 protected:
84 // Subtarget information, for instruction decoding predicates if required.
85 const MCSubtargetInfo &STI;
86 std::unique_ptr Symbolizer;
87
88 public:
89 // Helpers around MCSymbolizer
90 bool tryAddingSymbolicOperand(MCInst &Inst,
91 int64_t Value,
92 uint64_t Address, bool IsBranch,
93 uint64_t Offset, uint64_t InstSize) const;
94
95 void tryAddingPcLoadReferenceComment(int64_t Value, uint64_t Address) const;
96
97 /// Set \p Symzer as the current symbolizer.
98 /// This takes ownership of \p Symzer, and deletes the previously set one.
99 void setSymbolizer(std::unique_ptr Symzer);
100
101 MCContext& getContext() const { return Ctx; }
102
103 const MCSubtargetInfo& getSubtargetInfo() const { return STI; }
104
105 // Marked mutable because we cache it inside the disassembler, rather than
106 // having to pass it around as an argument through all the autogenerated code.
107 mutable raw_ostream *CommentStream;
108 };
109
110 } // namespace llvm
111
112 #endif
+0
-58
include/llvm/MC/MCExternalSymbolizer.h less more
None //===-- llvm/MC/MCExternalSymbolizer.h - ------------------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the MCExternalSymbolizer class, which
10 // enables library users to provide callbacks (through the C API) to do the
11 // symbolization externally.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_MC_MCEXTERNALSYMBOLIZER_H
16 #define LLVM_MC_MCEXTERNALSYMBOLIZER_H
17
18 #include "llvm-c/Disassembler.h"
19 #include "llvm/MC/MCSymbolizer.h"
20 #include
21
22 namespace llvm {
23
24 /// \brief Symbolize using user-provided, C API, callbacks.
25 ///
26 /// See llvm-c/Disassembler.h.
27 class MCExternalSymbolizer : public MCSymbolizer {
28 protected:
29 /// \name Hooks for symbolic disassembly via the public 'C' interface.
30 /// @{
31 /// The function to get the symbolic information for operands.
32 LLVMOpInfoCallback GetOpInfo;
33 /// The function to lookup a symbol name.
34 LLVMSymbolLookupCallback SymbolLookUp;
35 /// The pointer to the block of symbolic information for above call back.
36 void *DisInfo;
37 /// @}
38
39 public:
40 MCExternalSymbolizer(MCContext &Ctx,
41 std::unique_ptr RelInfo,
42 LLVMOpInfoCallback getOpInfo,
43 LLVMSymbolLookupCallback symbolLookUp, void *disInfo)
44 : MCSymbolizer(Ctx, std::move(RelInfo)), GetOpInfo(getOpInfo),
45 SymbolLookUp(symbolLookUp), DisInfo(disInfo) {}
46
47 bool tryAddingSymbolicOperand(MCInst &MI, raw_ostream &CommentStream,
48 int64_t Value, uint64_t Address, bool IsBranch,
49 uint64_t Offset, uint64_t InstSize) override;
50 void tryAddingPcLoadReferenceComment(raw_ostream &CommentStream,
51 int64_t Value,
52 uint64_t Address) override;
53 };
54
55 }
56
57 #endif
+0
-51
include/llvm/MC/MCRelocationInfo.h less more
None //==-- llvm/MC/MCRelocationInfo.h --------------------------------*- C++ -*-==//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the MCRelocationInfo class, which provides methods to
10 // create MCExprs from relocations, either found in an object::ObjectFile
11 // (object::RelocationRef), or provided through the C API.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_MC_MCRELOCATIONINFO_H
16 #define LLVM_MC_MCRELOCATIONINFO_H
17
18 #include "llvm/Support/Compiler.h"
19
20 namespace llvm {
21
22 namespace object {
23 class RelocationRef;
24 }
25 class MCExpr;
26 class MCContext;
27
28 /// \brief Create MCExprs from relocations found in an object file.
29 class MCRelocationInfo {
30 MCRelocationInfo(const MCRelocationInfo &) = delete;
31 void operator=(const MCRelocationInfo &) = delete;
32
33 protected:
34 MCContext &Ctx;
35
36 public:
37 MCRelocationInfo(MCContext &Ctx);
38 virtual ~MCRelocationInfo();
39
40 /// \brief Create an MCExpr for the target-specific \p VariantKind.
41 /// The VariantKinds are defined in llvm-c/Disassembler.h.
42 /// Used by MCExternalSymbolizer.
43 /// \returns If possible, an MCExpr corresponding to VariantKind, else 0.
44 virtual const MCExpr *createExprForCAPIVariantKind(const MCExpr *SubExpr,
45 unsigned VariantKind);
46 };
47
48 }
49
50 #endif
+0
-85
include/llvm/MC/MCSymbolizer.h less more
None //===-- llvm/MC/MCSymbolizer.h - MCSymbolizer class -------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the MCSymbolizer class, which is used
10 // to symbolize instructions decoded from an object, that is, transform their
11 // immediate operands to MCExprs.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_MC_MCSYMBOLIZER_H
16 #define LLVM_MC_MCSYMBOLIZER_H
17
18 #include "llvm/MC/MCRelocationInfo.h"
19 #include "llvm/Support/Compiler.h"
20 #include "llvm/Support/DataTypes.h"
21 #include
22 #include
23
24 namespace llvm {
25
26 class MCContext;
27 class MCInst;
28 class raw_ostream;
29
30 /// \brief Symbolize and annotate disassembled instructions.
31 ///
32 /// For now this mimics the old symbolization logic (from both ARM and x86), that
33 /// relied on user-provided (C API) callbacks to do the actual symbol lookup in
34 /// the object file. This was moved to MCExternalSymbolizer.
35 /// A better API would not rely on actually calling the two methods here from
36 /// inside each disassembler, but would use the instr info to determine what
37 /// operands are actually symbolizable, and in what way. I don't think this
38 /// information exists right now.
39 class MCSymbolizer {
40 MCSymbolizer(const MCSymbolizer &) = delete;
41 void operator=(const MCSymbolizer &) = delete;
42
43 protected:
44 MCContext &Ctx;
45 std::unique_ptr RelInfo;
46
47 public:
48 /// \brief Construct an MCSymbolizer, taking ownership of \p RelInfo.
49 MCSymbolizer(MCContext &Ctx, std::unique_ptr RelInfo)
50 : Ctx(Ctx), RelInfo(std::move(RelInfo)) {
51 }
52
53 virtual ~MCSymbolizer();
54
55 /// \brief Try to add a symbolic operand instead of \p Value to the MCInst.
56 ///
57 /// Instead of having a difficult to read immediate, a symbolic operand would
58 /// represent this immediate in a more understandable way, for instance as a
59 /// symbol or an offset from a symbol. Relocations can also be used to enrich
60 /// the symbolic expression.
61 /// \param Inst - The MCInst where to insert the symbolic operand.
62 /// \param cStream - Stream to print comments and annotations on.
63 /// \param Value - Operand value, pc-adjusted by the caller if necessary.
64 /// \param Address - Load address of the instruction.
65 /// \param IsBranch - Is the instruction a branch?
66 /// \param Offset - Byte offset of the operand inside the inst.
67 /// \param InstSize - Size of the instruction in bytes.
68 /// \return Whether a symbolic operand was added.
69 virtual bool tryAddingSymbolicOperand(MCInst &Inst, raw_ostream &cStream,
70 int64_t Value, uint64_t Address,
71 bool IsBranch, uint64_t Offset,
72 uint64_t InstSize) = 0;
73
74 /// \brief Try to add a comment on the PC-relative load.
75 /// For instance, in Mach-O, this is used to add annotations to instructions
76 /// that use C string literals, as found in __cstring.
77 virtual void tryAddingPcLoadReferenceComment(raw_ostream &cStream,
78 int64_t Value,
79 uint64_t Address) = 0;
80 };
81
82 }
83
84 #endif
1111 #include "RuntimeDyldImpl.h"
1212 #include "llvm/ExecutionEngine/RuntimeDyldChecker.h"
1313 #include "llvm/MC/MCContext.h"
14 #include "llvm/MC/MCDisassembler.h"
14 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
1515 #include "llvm/MC/MCInst.h"
1616 #include "llvm/Support/Path.h"
1717 #include
3737 MCSubtargetInfo.cpp
3838 MCSymbol.cpp
3939 MCSymbolELF.cpp
40 MCSymbolizer.cpp
4140 MCTargetOptions.cpp
4241 MCValue.cpp
4342 MCWin64EH.cpp
0 add_llvm_library(LLVMMCDisassembler
11 Disassembler.cpp
2 MCDisassembler.cpp
3 MCExternalSymbolizer.cpp
24 MCRelocationInfo.cpp
3 MCExternalSymbolizer.cpp
4 MCDisassembler.cpp
5 MCSymbolizer.cpp
56 )
1010 #include "llvm-c/Disassembler.h"
1111 #include "llvm/MC/MCAsmInfo.h"
1212 #include "llvm/MC/MCContext.h"
13 #include "llvm/MC/MCDisassembler.h"
13 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
14 #include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
15 #include "llvm/MC/MCDisassembler/MCSymbolizer.h"
1416 #include "llvm/MC/MCInst.h"
1517 #include "llvm/MC/MCInstPrinter.h"
1618 #include "llvm/MC/MCInstrInfo.h"
1719 #include "llvm/MC/MCRegisterInfo.h"
18 #include "llvm/MC/MCRelocationInfo.h"
1920 #include "llvm/MC/MCSubtargetInfo.h"
20 #include "llvm/MC/MCSymbolizer.h"
2121 #include "llvm/Support/ErrorHandling.h"
2222 #include "llvm/Support/FormattedStream.h"
2323 #include "llvm/Support/TargetRegistry.h"
66 //
77 //===----------------------------------------------------------------------===//
88
9 #include "llvm/MC/MCDisassembler.h"
10 #include "llvm/MC/MCExternalSymbolizer.h"
9 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
10 #include "llvm/MC/MCDisassembler/MCExternalSymbolizer.h"
1111 #include "llvm/Support/raw_ostream.h"
1212
1313 using namespace llvm;
66 //
77 //===----------------------------------------------------------------------===//
88
9 #include "llvm/MC/MCExternalSymbolizer.h"
9 #include "llvm/MC/MCDisassembler/MCExternalSymbolizer.h"
1010 #include "llvm/MC/MCContext.h"
1111 #include "llvm/MC/MCExpr.h"
1212 #include "llvm/MC/MCInst.h"
66 //
77 //===----------------------------------------------------------------------===//
88
9 #include "llvm/MC/MCRelocationInfo.h"
9 #include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
1010 #include "llvm-c/Disassembler.h"
1111 #include "llvm/Object/ObjectFile.h"
1212 #include "llvm/Support/TargetRegistry.h"
0 //===-- llvm/MC/MCSymbolizer.cpp - MCSymbolizer class -----------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "llvm/MC/MCDisassembler/MCSymbolizer.h"
10
11 using namespace llvm;
12
13 MCSymbolizer::~MCSymbolizer() {
14 }
+0
-15
lib/MC/MCSymbolizer.cpp less more
None //===-- llvm/MC/MCSymbolizer.cpp - MCSymbolizer class -----------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "llvm/MC/MCSymbolizer.h"
10
11 using namespace llvm;
12
13 MCSymbolizer::~MCSymbolizer() {
14 }
1212 #ifndef LLVM_LIB_TARGET_AARCH64_DISASSEMBLER_AARCH64DISASSEMBLER_H
1313 #define LLVM_LIB_TARGET_AARCH64_DISASSEMBLER_AARCH64DISASSEMBLER_H
1414
15 #include "llvm/MC/MCDisassembler.h"
15 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
1616
1717 namespace llvm {
1818
1313 #ifndef LLVM_LIB_TARGET_AARCH64_DISASSEMBLER_AARCH64EXTERNALSYMBOLIZER_H
1414 #define LLVM_LIB_TARGET_AARCH64_DISASSEMBLER_AARCH64EXTERNALSYMBOLIZER_H
1515
16 #include "llvm/MC/MCExternalSymbolizer.h"
16 #include "llvm/MC/MCDisassembler/MCExternalSymbolizer.h"
1717
1818 namespace llvm {
1919
1919 #include "llvm/MC/MCAsmInfo.h"
2020 #include "llvm/MC/MCAssembler.h"
2121 #include "llvm/MC/MCContext.h"
22 #include "llvm/MC/MCDisassembler.h"
22 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
2323 #include "llvm/MC/MCELFStreamer.h"
2424 #include "llvm/MC/MCExpr.h"
2525 #include "llvm/MC/MCInst.h"
66 //
77 //===----------------------------------------------------------------------===//
88
9 #include "llvm/MC/MCDisassembler.h"
9 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
1010 #include "MCTargetDesc/ARMAddressingModes.h"
1111 #include "MCTargetDesc/ARMBaseInfo.h"
1212 #include "MCTargetDesc/ARMMCExpr.h"
1111 #include "llvm-c/Disassembler.h"
1212 #include "llvm/MC/MCContext.h"
1313 #include "llvm/MC/MCExpr.h"
14 #include "llvm/MC/MCRelocationInfo.h"
14 #include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
1515
1616 using namespace llvm;
1717 using namespace object;
1515 #include "MCTargetDesc/HexagonMCInstrInfo.h"
1616 #include "MCTargetDesc/HexagonInstPrinter.h"
1717 #include "llvm/ADT/StringExtras.h"
18 #include "llvm/MC/MCDisassembler.h"
18 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
1919 #include "llvm/MC/MCContext.h"
2020 #include "llvm/MC/MCExpr.h"
2121 #include "llvm/MC/MCFixedLenDisassembler.h"
1414 #include "MipsRegisterInfo.h"
1515 #include "MipsSubtarget.h"
1616 #include "llvm/MC/MCContext.h"
17 #include "llvm/MC/MCDisassembler.h"
17 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
1818 #include "llvm/MC/MCFixedLenDisassembler.h"
1919 #include "llvm/MC/MCInst.h"
2020 #include "llvm/MC/MCSubtargetInfo.h"
77 //===----------------------------------------------------------------------===//
88
99 #include "PPC.h"
10 #include "llvm/MC/MCDisassembler.h"
10 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
1111 #include "llvm/MC/MCFixedLenDisassembler.h"
1212 #include "llvm/MC/MCInst.h"
1313 #include "llvm/MC/MCSubtargetInfo.h"
1313 #include "Sparc.h"
1414 #include "SparcRegisterInfo.h"
1515 #include "SparcSubtarget.h"
16 #include "llvm/MC/MCDisassembler.h"
16 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
1717 #include "llvm/MC/MCFixedLenDisassembler.h"
1818 #include "llvm/MC/MCInst.h"
1919 #include "llvm/MC/MCContext.h"
77 //===----------------------------------------------------------------------===//
88
99 #include "SystemZ.h"
10 #include "llvm/MC/MCDisassembler.h"
10 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
1111 #include "llvm/MC/MCFixedLenDisassembler.h"
1212 #include "llvm/MC/MCInst.h"
1313 #include "llvm/MC/MCSubtargetInfo.h"
1616 #include "X86Disassembler.h"
1717 #include "X86DisassemblerDecoder.h"
1818 #include "llvm/MC/MCContext.h"
19 #include "llvm/MC/MCDisassembler.h"
19 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
2020 #include "llvm/MC/MCExpr.h"
2121 #include "llvm/MC/MCInst.h"
2222 #include "llvm/MC/MCInstrInfo.h"
7474 #define LLVM_LIB_TARGET_X86_DISASSEMBLER_X86DISASSEMBLER_H
7575
7676 #include "X86DisassemblerDecoderCommon.h"
77 #include "llvm/MC/MCDisassembler.h"
77 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
7878
7979 namespace llvm {
8080
1414 #include "XCore.h"
1515 #include "XCoreRegisterInfo.h"
1616 #include "llvm/MC/MCContext.h"
17 #include "llvm/MC/MCDisassembler.h"
17 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
1818 #include "llvm/MC/MCFixedLenDisassembler.h"
1919 #include "llvm/MC/MCInst.h"
2020 #include "llvm/MC/MCSubtargetInfo.h"
1515 #include "llvm/ADT/Triple.h"
1616 #include "llvm/MC/MCAsmInfo.h"
1717 #include "llvm/MC/MCContext.h"
18 #include "llvm/MC/MCDisassembler.h"
18 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
1919 #include "llvm/MC/MCInst.h"
2020 #include "llvm/MC/MCRegisterInfo.h"
2121 #include "llvm/MC/MCStreamer.h"
2121 #include "llvm/DebugInfo/DWARF/DWARFContext.h"
2222 #include "llvm/MC/MCAsmInfo.h"
2323 #include "llvm/MC/MCContext.h"
24 #include "llvm/MC/MCDisassembler.h"
24 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
2525 #include "llvm/MC/MCInst.h"
2626 #include "llvm/MC/MCInstPrinter.h"
2727 #include "llvm/MC/MCInstrDesc.h"
2424 #include "llvm/DebugInfo/DWARF/DWARFContext.h"
2525 #include "llvm/MC/MCAsmInfo.h"
2626 #include "llvm/MC/MCContext.h"
27 #include "llvm/MC/MCDisassembler.h"
27 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
28 #include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
2829 #include "llvm/MC/MCInst.h"
2930 #include "llvm/MC/MCInstPrinter.h"
3031 #include "llvm/MC/MCInstrAnalysis.h"
3132 #include "llvm/MC/MCInstrInfo.h"
3233 #include "llvm/MC/MCObjectFileInfo.h"
3334 #include "llvm/MC/MCRegisterInfo.h"
34 #include "llvm/MC/MCRelocationInfo.h"
3535 #include "llvm/MC/MCSubtargetInfo.h"
3636 #include "llvm/Object/Archive.h"
37 #include "llvm/Object/COFF.h"
3738 #include "llvm/Object/ELFObjectFile.h"
38 #include "llvm/Object/COFF.h"
3939 #include "llvm/Object/MachO.h"
4040 #include "llvm/Object/ObjectFile.h"
4141 #include "llvm/Support/Casting.h"
1818 #include "llvm/ExecutionEngine/RuntimeDyldChecker.h"
1919 #include "llvm/MC/MCAsmInfo.h"
2020 #include "llvm/MC/MCContext.h"
21 #include "llvm/MC/MCDisassembler.h"
21 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
2222 #include "llvm/MC/MCInstPrinter.h"
2323 #include "llvm/MC/MCInstrInfo.h"
2424 #include "llvm/MC/MCRegisterInfo.h"
1313 #include "llvm/DebugInfo/Symbolize/Symbolize.h"
1414 #include "llvm/MC/MCAsmInfo.h"
1515 #include "llvm/MC/MCContext.h"
16 #include "llvm/MC/MCDisassembler.h"
16 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
1717 #include "llvm/MC/MCInst.h"
1818 #include "llvm/MC/MCInstPrinter.h"
1919 #include "llvm/MC/MCInstrAnalysis.h"