aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCSymbolizer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/MC/MCSymbolizer.h')
-rw-r--r--include/llvm/MC/MCSymbolizer.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/llvm/MC/MCSymbolizer.h b/include/llvm/MC/MCSymbolizer.h
index e42a2146dc53..cbbb591f1b80 100644
--- a/include/llvm/MC/MCSymbolizer.h
+++ b/include/llvm/MC/MCSymbolizer.h
@@ -16,10 +16,11 @@
#ifndef LLVM_MC_MCSYMBOLIZER_H
#define LLVM_MC_MCSYMBOLIZER_H
-#include "llvm/ADT/OwningPtr.h"
#include "llvm/MC/MCRelocationInfo.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DataTypes.h"
+#include <cassert>
+#include <memory>
namespace llvm {
@@ -42,11 +43,14 @@ class MCSymbolizer {
protected:
MCContext &Ctx;
- OwningPtr<MCRelocationInfo> RelInfo;
+ std::unique_ptr<MCRelocationInfo> RelInfo;
public:
/// \brief Construct an MCSymbolizer, taking ownership of \p RelInfo.
- MCSymbolizer(MCContext &Ctx, OwningPtr<MCRelocationInfo> &RelInfo);
+ MCSymbolizer(MCContext &Ctx, std::unique_ptr<MCRelocationInfo> RelInfo)
+ : Ctx(Ctx), RelInfo(std::move(RelInfo)) {
+ }
+
virtual ~MCSymbolizer();
/// \brief Try to add a symbolic operand instead of \p Value to the MCInst.