summaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCDisassembler
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/MC/MCDisassembler')
-rw-r--r--include/llvm/MC/MCDisassembler/MCDisassembler.h17
-rw-r--r--include/llvm/MC/MCDisassembler/MCRelocationInfo.h18
-rw-r--r--include/llvm/MC/MCDisassembler/MCSymbolizer.h16
3 files changed, 22 insertions, 29 deletions
diff --git a/include/llvm/MC/MCDisassembler/MCDisassembler.h b/include/llvm/MC/MCDisassembler/MCDisassembler.h
index 9006d87abb43d..5e626f1869861 100644
--- a/include/llvm/MC/MCDisassembler/MCDisassembler.h
+++ b/include/llvm/MC/MCDisassembler/MCDisassembler.h
@@ -1,4 +1,4 @@
-//===-- llvm/MC/MCDisassembler.h - Disassembler interface -------*- C++ -*-===//
+//===- llvm/MC/MCDisassembler.h - Disassembler interface --------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -6,20 +6,21 @@
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
+
#ifndef LLVM_MC_MCDISASSEMBLER_MCDISASSEMBLER_H
#define LLVM_MC_MCDISASSEMBLER_MCDISASSEMBLER_H
-#include "llvm-c/Disassembler.h"
#include "llvm/MC/MCDisassembler/MCSymbolizer.h"
-#include "llvm/Support/DataTypes.h"
+#include <cstdint>
+#include <memory>
namespace llvm {
template <typename T> class ArrayRef;
+class MCContext;
class MCInst;
class MCSubtargetInfo;
class raw_ostream;
-class MCContext;
/// Superclass for all disassemblers. Consumes a memory region and provides an
/// array of assembly instructions.
@@ -54,7 +55,7 @@ public:
};
MCDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx)
- : Ctx(Ctx), STI(STI), Symbolizer(), CommentStream(nullptr) {}
+ : Ctx(Ctx), STI(STI) {}
virtual ~MCDisassembler();
@@ -105,9 +106,9 @@ public:
// Marked mutable because we cache it inside the disassembler, rather than
// having to pass it around as an argument through all the autogenerated code.
- mutable raw_ostream *CommentStream;
+ mutable raw_ostream *CommentStream = nullptr;
};
-} // namespace llvm
+} // end namespace llvm
-#endif
+#endif // LLVM_MC_MCDISASSEMBLER_MCDISASSEMBLER_H
diff --git a/include/llvm/MC/MCDisassembler/MCRelocationInfo.h b/include/llvm/MC/MCDisassembler/MCRelocationInfo.h
index 25334f755ee6b..7836e886c303c 100644
--- a/include/llvm/MC/MCDisassembler/MCRelocationInfo.h
+++ b/include/llvm/MC/MCDisassembler/MCRelocationInfo.h
@@ -1,4 +1,4 @@
-//==-- llvm/MC/MCRelocationInfo.h --------------------------------*- C++ -*-==//
+//===- llvm/MC/MCRelocationInfo.h -------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -16,26 +16,20 @@
#ifndef LLVM_MC_MCDISASSEMBLER_MCRELOCATIONINFO_H
#define LLVM_MC_MCDISASSEMBLER_MCRELOCATIONINFO_H
-#include "llvm/Support/Compiler.h"
-
namespace llvm {
-namespace object {
-class RelocationRef;
-}
-class MCExpr;
class MCContext;
+class MCExpr;
/// \brief Create MCExprs from relocations found in an object file.
class MCRelocationInfo {
- MCRelocationInfo(const MCRelocationInfo &) = delete;
- void operator=(const MCRelocationInfo &) = delete;
-
protected:
MCContext &Ctx;
public:
MCRelocationInfo(MCContext &Ctx);
+ MCRelocationInfo(const MCRelocationInfo &) = delete;
+ MCRelocationInfo &operator=(const MCRelocationInfo &) = delete;
virtual ~MCRelocationInfo();
/// \brief Create an MCExpr for the target-specific \p VariantKind.
@@ -46,6 +40,6 @@ public:
unsigned VariantKind);
};
-}
+} // end namespace llvm
-#endif
+#endif // LLVM_MC_MCDISASSEMBLER_MCRELOCATIONINFO_H
diff --git a/include/llvm/MC/MCDisassembler/MCSymbolizer.h b/include/llvm/MC/MCDisassembler/MCSymbolizer.h
index 713467c0a3e70..d85cf5e066f5a 100644
--- a/include/llvm/MC/MCDisassembler/MCSymbolizer.h
+++ b/include/llvm/MC/MCDisassembler/MCSymbolizer.h
@@ -1,4 +1,4 @@
-//===-- llvm/MC/MCSymbolizer.h - MCSymbolizer class -------------*- C++ -*-===//
+//===- llvm/MC/MCSymbolizer.h - MCSymbolizer class --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -17,9 +17,8 @@
#define LLVM_MC_MCDISASSEMBLER_MCSYMBOLIZER_H
#include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
-#include "llvm/Support/Compiler.h"
-#include "llvm/Support/DataTypes.h"
-#include <cassert>
+#include <algorithm>
+#include <cstdint>
#include <memory>
namespace llvm {
@@ -38,9 +37,6 @@ class raw_ostream;
/// operands are actually symbolizable, and in what way. I don't think this
/// information exists right now.
class MCSymbolizer {
- MCSymbolizer(const MCSymbolizer &) = delete;
- void operator=(const MCSymbolizer &) = delete;
-
protected:
MCContext &Ctx;
std::unique_ptr<MCRelocationInfo> RelInfo;
@@ -51,6 +47,8 @@ public:
: Ctx(Ctx), RelInfo(std::move(RelInfo)) {
}
+ MCSymbolizer(const MCSymbolizer &) = delete;
+ MCSymbolizer &operator=(const MCSymbolizer &) = delete;
virtual ~MCSymbolizer();
/// \brief Try to add a symbolic operand instead of \p Value to the MCInst.
@@ -80,6 +78,6 @@ public:
uint64_t Address) = 0;
};
-}
+} // end namespace llvm
-#endif
+#endif // LLVM_MC_MCDISASSEMBLER_MCSYMBOLIZER_H