diff options
author | Ahmed Charles <ahmedcharles@gmail.com> | 2014-03-06 05:51:42 +0000 |
---|---|---|
committer | Ahmed Charles <ahmedcharles@gmail.com> | 2014-03-06 05:51:42 +0000 |
commit | f4ccd110750a3f3fe6a107d5c74c649c2a0dc407 (patch) | |
tree | ded9f38d17d1d9f3693d90f82a0a596726034174 /lib/MC/MCDisassembler/Disassembler.h | |
parent | ca8b562f2d4d996d5198af537ad312e544da1172 (diff) | |
download | llvm-f4ccd110750a3f3fe6a107d5c74c649c2a0dc407.tar.gz llvm-f4ccd110750a3f3fe6a107d5c74c649c2a0dc407.tar.bz2 llvm-f4ccd110750a3f3fe6a107d5c74c649c2a0dc407.tar.xz |
Replace OwningPtr<T> with std::unique_ptr<T>.
This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCDisassembler/Disassembler.h')
-rw-r--r-- | lib/MC/MCDisassembler/Disassembler.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/MC/MCDisassembler/Disassembler.h b/lib/MC/MCDisassembler/Disassembler.h index 4855af27dd..d1d40cd238 100644 --- a/lib/MC/MCDisassembler/Disassembler.h +++ b/lib/MC/MCDisassembler/Disassembler.h @@ -18,7 +18,6 @@ #define LLVM_MC_DISASSEMBLER_H #include "llvm-c/Disassembler.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/raw_ostream.h" #include <string> @@ -56,23 +55,23 @@ private: // LLVMDisasmInstruction(). // // The LLVM target corresponding to the disassembler. - // FIXME: using llvm::OwningPtr<const llvm::Target> causes a malloc error + // FIXME: using std::unique_ptr<const llvm::Target> causes a malloc error // when this LLVMDisasmContext is deleted. const Target *TheTarget; // The assembly information for the target architecture. - llvm::OwningPtr<const llvm::MCAsmInfo> MAI; + std::unique_ptr<const llvm::MCAsmInfo> MAI; // The register information for the target architecture. - llvm::OwningPtr<const llvm::MCRegisterInfo> MRI; + std::unique_ptr<const llvm::MCRegisterInfo> MRI; // The subtarget information for the target architecture. - llvm::OwningPtr<const llvm::MCSubtargetInfo> MSI; + std::unique_ptr<const llvm::MCSubtargetInfo> MSI; // The instruction information for the target architecture. - llvm::OwningPtr<const llvm::MCInstrInfo> MII; + std::unique_ptr<const llvm::MCInstrInfo> MII; // The assembly context for creating symbols and MCExprs. - llvm::OwningPtr<const llvm::MCContext> Ctx; + std::unique_ptr<const llvm::MCContext> Ctx; // The disassembler for the target architecture. - llvm::OwningPtr<const llvm::MCDisassembler> DisAsm; + std::unique_ptr<const llvm::MCDisassembler> DisAsm; // The instruction printer for the target architecture. - llvm::OwningPtr<llvm::MCInstPrinter> IP; + std::unique_ptr<llvm::MCInstPrinter> IP; // The options used to set up the disassembler. uint64_t Options; // The CPU string. |