llvm.org GIT mirror llvm / 1d16fde
[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 Benjamin Kramer 6 years ago
12 changed file(s) with 23 addition(s) and 32 deletion(s). Raw diff Collapse all Expand all
1616 #define LLVM_ADT_EDIT_DISTANCE_H
1717
1818 #include "llvm/ADT/ArrayRef.h"
19 #include "llvm/ADT/OwningPtr.h"
2019 #include
20 #include
2121
2222 namespace llvm {
2323
5656
5757 const unsigned SmallBufferSize = 64;
5858 unsigned SmallBuffer[SmallBufferSize];
59 llvm::OwningArrayPtr> Allocated;
59 std::unique_ptr> Allocated;
6060 unsigned *Previous = SmallBuffer;
6161 if (2*(n + 1) > SmallBufferSize) {
6262 Previous = new unsigned [2*(n+1)];
2424 #define LLVM_CODEGEN_LIVEREGMATRIX_H
2525
2626 #include "llvm/ADT/BitVector.h"
27 #include "llvm/ADT/OwningPtr.h"
2827 #include "llvm/CodeGen/LiveIntervalUnion.h"
2928 #include "llvm/CodeGen/MachineFunctionPass.h"
3029
5049 LiveIntervalUnion::Array Matrix;
5150
5251 // Cached queries per register unit.
53 OwningArrayPtr> Queries;
52 std::unique_ptr> Queries;
5453
5554 // Cached register mask interference info.
5655 unsigned RegMaskTag;
1818
1919 #include "llvm/ADT/ArrayRef.h"
2020 #include "llvm/ADT/BitVector.h"
21 #include "llvm/ADT/OwningPtr.h"
2221 #include "llvm/Target/TargetRegisterInfo.h"
2322
2423 namespace llvm {
3029 bool ProperSubClass;
3130 uint8_t MinCost;
3231 uint16_t LastCostChange;
33 OwningArrayPtr> Order;
32 std::unique_ptr> Order;
3433
3534 RCInfo()
3635 : Tag(0), NumRegs(0), ProperSubClass(false), MinCost(0),
4241 };
4342
4443 // Brief cached information for each register class.
45 OwningArrayPtr> RegClass;
44 std::unique_ptr> RegClass;
4645
4746 // Tag changes whenever cached information needs to be recomputed. An RCInfo
4847 // entry is valid when its tag matches.
6160 // Reserved registers in the current MF.
6261 BitVector Reserved;
6362
64 OwningArrayPtr> PSetLimits;
63 std::unique_ptr> PSetLimits;
6564
6665 // Compute all information about RC.
6766 void compute(const TargetRegisterClass *RC) const;
1010 #define LLVM_LINEEDITOR_LINEEDITOR_H
1111
1212 #include "llvm/ADT/Optional.h"
13 #include "llvm/ADT/OwningPtr.h"
1413 #include "llvm/ADT/StringRef.h"
15 #include <stdio.h>
14 #include <cstdio>
15 #include
1616 #include
1717 #include
1818
99 #define LLVM_MC_MCDISASSEMBLER_H
1010
1111 #include "llvm-c/Disassembler.h"
12 #include "llvm/ADT/OwningPtr.h"
1312 #include "llvm/MC/MCRelocationInfo.h"
1413 #include "llvm/MC/MCSymbolizer.h"
1514 #include "llvm/Support/DataTypes.h"
2222 #include "Thumb1FrameLowering.h"
2323 #include "Thumb1InstrInfo.h"
2424 #include "Thumb2InstrInfo.h"
25 #include "llvm/ADT/OwningPtr.h"
2625 #include "llvm/IR/DataLayout.h"
2726 #include "llvm/MC/MCStreamer.h"
2827 #include "llvm/Target/TargetMachine.h"
127126 class ThumbTargetMachine : public ARMBaseTargetMachine {
128127 virtual void anchor();
129128 // Either Thumb1InstrInfo or Thumb2InstrInfo.
130 OwningPtr InstrInfo;
129 std::unique_ptr InstrInfo;
131130 const DataLayout DL; // Calculates type size & alignment
132131 ARMTargetLowering TLInfo;
133132 ARMSelectionDAGInfo TSInfo;
134133 // Either Thumb1FrameLowering or ARMFrameLowering.
135 OwningPtr FrameLowering;
134 std::unique_ptr FrameLowering;
136135 public:
137136 ThumbTargetMachine(const Target &T, StringRef TT,
138137 StringRef CPU, StringRef FS,
1212 #include "MCTargetDesc/ARMArchName.h"
1313 #include "MCTargetDesc/ARMBaseInfo.h"
1414 #include "MCTargetDesc/ARMMCExpr.h"
15 #include "llvm/ADT/OwningPtr.h"
1615 #include "llvm/ADT/STLExtras.h"
1716 #include "llvm/ADT/SmallVector.h"
1817 #include "llvm/ADT/StringExtras.h"
29162915 // The source register for the shift has already been added to the
29172916 // operand list, so we need to pop it off and combine it into the shifted
29182917 // register operand instead.
2919 OwningPtr PrevOp((ARMOperand*)Operands.pop_back_val());
2918 std::unique_ptr PrevOp((ARMOperand*)Operands.pop_back_val());
29202919 if (!PrevOp->isReg())
29212920 return Error(PrevOp->getStartLoc(), "shift must be of a register");
29222921 int SrcReg = PrevOp->getReg();
1313 #ifndef HEXAGONASMPRINTER_H
1414 #define HEXAGONASMPRINTER_H
1515
16 #include "llvm/ADT/OwningPtr.h"
1716 #include "llvm/ADT/PriorityQueue.h"
1817 #include "llvm/Analysis/AliasAnalysis.h"
1918 #include "llvm/CodeGen/LiveIntervalAnalysis.h"
609609 RegDefsUses RegDU(TM);
610610 bool HasMultipleSuccs = false;
611611 BB2BrMap BrMap;
612 OwningPtr IM;
612 std::unique_ptr IM;
613613 Iter Filler;
614614
615615 // Iterate over SuccBB's predecessor list.
1919 #include "MipsJITInfo.h"
2020 #include "MipsSelectionDAGInfo.h"
2121 #include "MipsSubtarget.h"
22 #include "llvm/ADT/OwningPtr.h"
2322 #include "llvm/CodeGen/Passes.h"
2423 #include "llvm/CodeGen/SelectionDAGISel.h"
2524 #include "llvm/IR/DataLayout.h"
3332 class MipsTargetMachine : public LLVMTargetMachine {
3433 MipsSubtarget Subtarget;
3534 const DataLayout DL; // Calculates type size & alignment
36 OwningPtr InstrInfo;
37 OwningPtr FrameLowering;
38 OwningPtr TLInfo;
39 OwningPtr InstrInfo16;
40 OwningPtr FrameLowering16;
41 OwningPtr TLInfo16;
42 OwningPtr InstrInfoSE;
43 OwningPtr FrameLoweringSE;
44 OwningPtr TLInfoSE;
35 std::unique_ptr InstrInfo;
36 std::unique_ptr FrameLowering;
37 std::unique_ptr TLInfo;
38 std::unique_ptr InstrInfo16;
39 std::unique_ptr FrameLowering16;
40 std::unique_ptr TLInfo16;
41 std::unique_ptr InstrInfoSE;
42 std::unique_ptr FrameLoweringSE;
43 std::unique_ptr TLInfoSE;
4544 MipsSelectionDAGInfo TSInfo;
4645 const InstrItineraryData &InstrItins;
4746 MipsJITInfo JITInfo;
1515 #include "NVPTX.h"
1616 #include "NVPTXAllocaHoisting.h"
1717 #include "NVPTXLowerAggrCopies.h"
18 #include "llvm/ADT/OwningPtr.h"
1918 #include "llvm/Analysis/Passes.h"
2019 #include "llvm/CodeGen/AsmPrinter.h"
2120 #include "llvm/CodeGen/MachineFunctionAnalysis.h"
1919 #include "AMDGPUSubtarget.h"
2020 #include "AMDILIntrinsicInfo.h"
2121 #include "R600ISelLowering.h"
22 #include "llvm/ADT/OwningPtr.h"
2322 #include "llvm/IR/DataLayout.h"
2423
2524 namespace llvm {
3029 const DataLayout Layout;
3130 AMDGPUFrameLowering FrameLowering;
3231 AMDGPUIntrinsicInfo IntrinsicInfo;
33 OwningPtr InstrInfo;
34 OwningPtr TLInfo;
32 std::unique_ptr InstrInfo;
33 std::unique_ptr TLInfo;
3534 const InstrItineraryData *InstrItins;
3635
3736 public: