diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-04-21 09:34:48 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-04-21 09:34:48 +0000 |
commit | 1d16fdecd63c1e36802d04531f69b40b9a8e7e18 (patch) | |
tree | cdf21658ae8e2b4408e245b00197905884b76df1 /include | |
parent | 4d3682bda5d737183f188d2b58e0ff8c837d241f (diff) | |
download | llvm-1d16fdecd63c1e36802d04531f69b40b9a8e7e18.tar.gz llvm-1d16fdecd63c1e36802d04531f69b40b9a8e7e18.tar.bz2 llvm-1d16fdecd63c1e36802d04531f69b40b9a8e7e18.tar.xz |
[C++11] Replace OwningPtr with std::unique_ptr in places where it doesn't break the API.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206740 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/edit_distance.h | 4 | ||||
-rw-r--r-- | include/llvm/CodeGen/LiveRegMatrix.h | 3 | ||||
-rw-r--r-- | include/llvm/CodeGen/RegisterClassInfo.h | 7 | ||||
-rw-r--r-- | include/llvm/LineEditor/LineEditor.h | 4 | ||||
-rw-r--r-- | include/llvm/MC/MCDisassembler.h | 1 |
5 files changed, 8 insertions, 11 deletions
diff --git a/include/llvm/ADT/edit_distance.h b/include/llvm/ADT/edit_distance.h index f77ef13fef..9ee1edc54e 100644 --- a/include/llvm/ADT/edit_distance.h +++ b/include/llvm/ADT/edit_distance.h @@ -17,8 +17,8 @@ #define LLVM_ADT_EDIT_DISTANCE_H #include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/OwningPtr.h" #include <algorithm> +#include <memory> namespace llvm { @@ -57,7 +57,7 @@ unsigned ComputeEditDistance(ArrayRef<T> FromArray, ArrayRef<T> ToArray, const unsigned SmallBufferSize = 64; unsigned SmallBuffer[SmallBufferSize]; - llvm::OwningArrayPtr<unsigned> Allocated; + std::unique_ptr<unsigned[]> Allocated; unsigned *Previous = SmallBuffer; if (2*(n + 1) > SmallBufferSize) { Previous = new unsigned [2*(n+1)]; diff --git a/include/llvm/CodeGen/LiveRegMatrix.h b/include/llvm/CodeGen/LiveRegMatrix.h index 28b819bb6f..878b4d9836 100644 --- a/include/llvm/CodeGen/LiveRegMatrix.h +++ b/include/llvm/CodeGen/LiveRegMatrix.h @@ -25,7 +25,6 @@ #define LLVM_CODEGEN_LIVEREGMATRIX_H #include "llvm/ADT/BitVector.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/CodeGen/LiveIntervalUnion.h" #include "llvm/CodeGen/MachineFunctionPass.h" @@ -51,7 +50,7 @@ class LiveRegMatrix : public MachineFunctionPass { LiveIntervalUnion::Array Matrix; // Cached queries per register unit. - OwningArrayPtr<LiveIntervalUnion::Query> Queries; + std::unique_ptr<LiveIntervalUnion::Query[]> Queries; // Cached register mask interference info. unsigned RegMaskTag; diff --git a/include/llvm/CodeGen/RegisterClassInfo.h b/include/llvm/CodeGen/RegisterClassInfo.h index dd51872a4c..d784dfbda7 100644 --- a/include/llvm/CodeGen/RegisterClassInfo.h +++ b/include/llvm/CodeGen/RegisterClassInfo.h @@ -19,7 +19,6 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/BitVector.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/Target/TargetRegisterInfo.h" namespace llvm { @@ -31,7 +30,7 @@ class RegisterClassInfo { bool ProperSubClass; uint8_t MinCost; uint16_t LastCostChange; - OwningArrayPtr<MCPhysReg> Order; + std::unique_ptr<MCPhysReg[]> Order; RCInfo() : Tag(0), NumRegs(0), ProperSubClass(false), MinCost(0), @@ -43,7 +42,7 @@ class RegisterClassInfo { }; // Brief cached information for each register class. - OwningArrayPtr<RCInfo> RegClass; + std::unique_ptr<RCInfo[]> RegClass; // Tag changes whenever cached information needs to be recomputed. An RCInfo // entry is valid when its tag matches. @@ -62,7 +61,7 @@ class RegisterClassInfo { // Reserved registers in the current MF. BitVector Reserved; - OwningArrayPtr<unsigned> PSetLimits; + std::unique_ptr<unsigned[]> PSetLimits; // Compute all information about RC. void compute(const TargetRegisterClass *RC) const; diff --git a/include/llvm/LineEditor/LineEditor.h b/include/llvm/LineEditor/LineEditor.h index 42839edde0..1a9a691060 100644 --- a/include/llvm/LineEditor/LineEditor.h +++ b/include/llvm/LineEditor/LineEditor.h @@ -11,9 +11,9 @@ #define LLVM_LINEEDITOR_LINEEDITOR_H #include "llvm/ADT/Optional.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/StringRef.h" -#include <stdio.h> +#include <cstdio> +#include <memory> #include <string> #include <vector> diff --git a/include/llvm/MC/MCDisassembler.h b/include/llvm/MC/MCDisassembler.h index 169304ebd6..9d441bbd88 100644 --- a/include/llvm/MC/MCDisassembler.h +++ b/include/llvm/MC/MCDisassembler.h @@ -10,7 +10,6 @@ #define LLVM_MC_MCDISASSEMBLER_H #include "llvm-c/Disassembler.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/MC/MCRelocationInfo.h" #include "llvm/MC/MCSymbolizer.h" #include "llvm/Support/DataTypes.h" |