summaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCWasmObjectWriter.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/MC/MCWasmObjectWriter.h')
-rw-r--r--include/llvm/MC/MCWasmObjectWriter.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/llvm/MC/MCWasmObjectWriter.h b/include/llvm/MC/MCWasmObjectWriter.h
index a4d5eb857b39..e45030f302ff 100644
--- a/include/llvm/MC/MCWasmObjectWriter.h
+++ b/include/llvm/MC/MCWasmObjectWriter.h
@@ -10,18 +10,16 @@
#ifndef LLVM_MC_MCWASMOBJECTWRITER_H
#define LLVM_MC_MCWASMOBJECTWRITER_H
-#include "llvm/ADT/Triple.h"
-#include "llvm/BinaryFormat/Wasm.h"
-#include "llvm/Support/DataTypes.h"
+#include "llvm/MC/MCObjectWriter.h"
+#include <memory>
namespace llvm {
class MCFixup;
-class MCObjectWriter;
class MCValue;
class raw_pwrite_stream;
-class MCWasmObjectTargetWriter {
+class MCWasmObjectTargetWriter : public MCObjectTargetWriter {
const unsigned Is64Bit : 1;
protected:
@@ -30,6 +28,11 @@ protected:
public:
virtual ~MCWasmObjectTargetWriter();
+ virtual Triple::ObjectFormatType getFormat() const { return Triple::Wasm; }
+ static bool classof(const MCObjectTargetWriter *W) {
+ return W->getFormat() == Triple::Wasm;
+ }
+
virtual unsigned getRelocType(const MCValue &Target,
const MCFixup &Fixup) const = 0;
@@ -39,7 +42,7 @@ public:
/// @}
};
-/// \brief Construct a new Wasm writer instance.
+/// Construct a new Wasm writer instance.
///
/// \param MOTW - The target specific Wasm writer subclass.
/// \param OS - The stream to write to.