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.

llvm-svn: 203083
This commit is contained in:
Ahmed Charles 2014-03-06 05:51:42 +00:00
parent be06bbe6e6
commit 52ce0c101e
167 changed files with 556 additions and 654 deletions

View File

@ -96,7 +96,7 @@ int main(int argc, char **argv) {
LLVMContext Context;
// Create some module to put our function into it.
OwningPtr<Module> M(new Module("test", Context));
std::unique_ptr<Module> M(new Module("test", Context));
// We are about to create the "fib" function:
Function *FibF = CreateFibFunction(M.get(), Context);

View File

@ -715,7 +715,7 @@ public:
// This file isn't in our cache
return NULL;
}
OwningPtr<MemoryBuffer> IRObjectBuffer;
std::unique_ptr<MemoryBuffer> IRObjectBuffer;
MemoryBuffer::getFile(IRCacheFile.c_str(), IRObjectBuffer, -1, false);
// MCJIT will want to write into this buffer, and we don't want that
// because the file has probably just been mmapped. Instead we make

View File

@ -739,7 +739,7 @@ public:
// This file isn't in our cache
return NULL;
}
OwningPtr<MemoryBuffer> IRObjectBuffer;
std::unique_ptr<MemoryBuffer> IRObjectBuffer;
MemoryBuffer::getFile(IRCacheFile.c_str(), IRObjectBuffer, -1, false);
// MCJIT will want to write into this buffer, and we don't want that
// because the file has probably just been mmapped. Instead we make

View File

@ -53,7 +53,6 @@
#define LLVM_ANALYSIS_CALLGRAPH_H
#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Function.h"
@ -314,7 +313,7 @@ private:
/// call graph interface is entirelly a wrapper around a \c CallGraph object
/// which is stored internally for each module.
class CallGraphWrapperPass : public ModulePass {
OwningPtr<CallGraph> G;
std::unique_ptr<CallGraph> G;
public:
static char ID; // Class identification, replacement for typeinfo

View File

@ -15,7 +15,6 @@
#define LLVM_ANALYSIS_MEMORYDEPENDENCEANALYSIS_H
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Analysis/AliasAnalysis.h"
@ -325,7 +324,8 @@ namespace llvm {
AliasAnalysis *AA;
const DataLayout *DL;
DominatorTree *DT;
OwningPtr<PredIteratorCache> PredCache;
std::unique_ptr<PredIteratorCache> PredCache;
public:
MemoryDependenceAnalysis();
~MemoryDependenceAnalysis();

View File

@ -15,7 +15,6 @@
#ifndef LLVM_BITCODE_BITSTREAMREADER_H
#define LLVM_BITCODE_BITSTREAMREADER_H
#include "llvm/ADT/OwningPtr.h"
#include "llvm/Bitcode/BitCodes.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/StreamableMemoryObject.h"
@ -44,7 +43,7 @@ public:
std::vector<std::pair<unsigned, std::string> > RecordNames;
};
private:
OwningPtr<StreamableMemoryObject> BitcodeBytes;
std::unique_ptr<StreamableMemoryObject> BitcodeBytes;
std::vector<BlockInfo> BlockInfoRecords;

View File

@ -29,7 +29,6 @@ namespace llvm {
class MachineBlockFrequencyInfo;
class MachineFunction;
class TargetRegisterInfo;
template<class T> class OwningPtr;
typedef PBQP::RegAlloc::Graph PBQPRAGraph;
@ -158,8 +157,9 @@ namespace llvm {
PBQP::PBQPNum benefit);
};
FunctionPass* createPBQPRegisterAllocator(OwningPtr<PBQPBuilder> &builder,
char *customPassID=0);
FunctionPass *
createPBQPRegisterAllocator(std::unique_ptr<PBQPBuilder> &builder,
char *customPassID = 0);
}
#endif /* LLVM_CODEGEN_REGALLOCPBQP_H */

View File

@ -15,7 +15,6 @@
#ifndef LLVM_EXECUTIONENGINE_OBJECTBUFFER_H
#define LLVM_EXECUTIONENGINE_OBJECTBUFFER_H
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
@ -49,7 +48,7 @@ public:
protected:
// The memory contained in an ObjectBuffer
OwningPtr<MemoryBuffer> Buffer;
std::unique_ptr<MemoryBuffer> Buffer;
};
/// ObjectBufferStream - This class encapsulates the SmallVector and

View File

@ -28,7 +28,7 @@ class ObjectImage {
virtual void anchor();
protected:
OwningPtr<ObjectBuffer> Buffer;
std::unique_ptr<ObjectBuffer> Buffer;
public:
ObjectImage(ObjectBuffer *Input) : Buffer(Input) {}

View File

@ -15,7 +15,6 @@
#ifndef LLVM_IR_MODULE_H
#define LLVM_IR_MODULE_H
#include "llvm/ADT/OwningPtr.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalAlias.h"
@ -197,7 +196,8 @@ private:
NamedMDListType NamedMDList; ///< The named metadata in the module
std::string GlobalScopeAsm; ///< Inline Asm at global scope.
ValueSymbolTable *ValSymTab; ///< Symbol table for values
OwningPtr<GVMaterializer> Materializer; ///< Used to materialize GlobalValues
std::unique_ptr<GVMaterializer>
Materializer; ///< Used to materialize GlobalValues
std::string ModuleID; ///< Human readable identifier for the module
std::string TargetTriple; ///< Platform target triple Module compiled on
void *NamedMDSymTab; ///< NamedMDNode names.

View File

@ -15,7 +15,6 @@
#define LTO_MODULE_H
#include "llvm-c/lto.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Module.h"
@ -48,8 +47,8 @@ private:
const llvm::GlobalValue *symbol;
};
llvm::OwningPtr<llvm::Module> _module;
llvm::OwningPtr<llvm::TargetMachine> _target;
std::unique_ptr<llvm::Module> _module;
std::unique_ptr<llvm::TargetMachine> _target;
llvm::MCObjectFileInfo ObjFileInfo;
StringSet _linkeropt_strings;
std::vector<const char *> _deplibs;

View File

@ -111,7 +111,7 @@ public:
private:
std::string Prompt;
std::string HistoryPath;
OwningPtr<InternalData> Data;
std::unique_ptr<InternalData> Data;
struct CompleterConcept {
virtual ~CompleterConcept();
@ -145,7 +145,7 @@ private:
T Value;
};
llvm::OwningPtr<const CompleterConcept> Completer;
std::unique_ptr<const CompleterConcept> Completer;
};
}

View File

@ -56,10 +56,9 @@ public:
};
/// Constructor - Performs initial setup for the disassembler.
MCDisassembler(const MCSubtargetInfo &STI) : GetOpInfo(0), SymbolLookUp(0),
DisInfo(0), Ctx(0),
STI(STI), Symbolizer(0),
CommentStream(0) {}
MCDisassembler(const MCSubtargetInfo &STI)
: GetOpInfo(0), SymbolLookUp(0), DisInfo(0), Ctx(0), STI(STI),
Symbolizer(), CommentStream(0) {}
virtual ~MCDisassembler();
@ -102,7 +101,7 @@ private:
protected:
// Subtarget information, for instruction decoding predicates if required.
const MCSubtargetInfo &STI;
OwningPtr<MCSymbolizer> Symbolizer;
std::unique_ptr<MCSymbolizer> Symbolizer;
public:
// Helpers around MCSymbolizer
@ -115,7 +114,7 @@ public:
/// Set \p Symzer as the current symbolizer.
/// This takes ownership of \p Symzer, and deletes the previously set one.
void setSymbolizer(OwningPtr<MCSymbolizer> &Symzer);
void setSymbolizer(std::unique_ptr<MCSymbolizer> &Symzer);
/// Sets up an external symbolizer that uses the C API callbacks.
void setupForSymbolicDisassembly(LLVMOpInfoCallback GetOpInfo,

View File

@ -18,6 +18,7 @@
#include "llvm-c/Disassembler.h"
#include "llvm/MC/MCSymbolizer.h"
#include <memory>
namespace llvm {
@ -38,12 +39,11 @@ class MCExternalSymbolizer : public MCSymbolizer {
public:
MCExternalSymbolizer(MCContext &Ctx,
OwningPtr<MCRelocationInfo> &RelInfo,
std::unique_ptr<MCRelocationInfo> &RelInfo,
LLVMOpInfoCallback getOpInfo,
LLVMSymbolLookupCallback symbolLookUp,
void *disInfo)
: MCSymbolizer(Ctx, RelInfo),
GetOpInfo(getOpInfo), SymbolLookUp(symbolLookUp), DisInfo(disInfo) {}
LLVMSymbolLookupCallback symbolLookUp, void *disInfo)
: MCSymbolizer(Ctx, RelInfo), GetOpInfo(getOpInfo),
SymbolLookUp(symbolLookUp), DisInfo(disInfo) {}
bool tryAddingSymbolicOperand(MCInst &MI, raw_ostream &CommentStream,
int64_t Value,

View File

@ -11,7 +11,6 @@
#define LLVM_MC_MCMACHOBJECTWRITER_H
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCObjectWriter.h"
@ -92,7 +91,7 @@ class MachObjectWriter : public MCObjectWriter {
};
/// The target specific Mach-O writer instance.
llvm::OwningPtr<MCMachObjectTargetWriter> TargetObjectWriter;
std::unique_ptr<MCMachObjectTargetWriter> TargetObjectWriter;
/// @name Relocation Data
/// @{

View File

@ -16,7 +16,6 @@
#ifndef LLVM_MC_MCMODULEYAML_H
#define LLVM_MC_MCMODULEYAML_H
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/MC/MCModule.h"
#include "llvm/Support/raw_ostream.h"
@ -33,7 +32,7 @@ StringRef mcmodule2yaml(raw_ostream &OS, const MCModule &MCM,
/// \brief Creates a new module and returns it in \p MCM.
/// \returns The empty string on success, an error message on failure.
StringRef yaml2mcmodule(OwningPtr<MCModule> &MCM, StringRef YamlContent,
StringRef yaml2mcmodule(std::unique_ptr<MCModule> &MCM, StringRef YamlContent,
const MCInstrInfo &MII, const MCRegisterInfo &MRI);
} // end namespace llvm

View File

@ -16,7 +16,6 @@
#define LLVM_MC_MCOBJECTDISASSEMBLER_H
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/MemoryObject.h"
@ -67,7 +66,7 @@ public:
/// \brief Set the region on which to fallback if disassembly was requested
/// somewhere not accessible in the object file.
/// This is used for dynamic disassembly (see RawMemoryObject).
void setFallbackRegion(OwningPtr<MemoryObject> &Region) {
void setFallbackRegion(std::unique_ptr<MemoryObject> &Region) {
FallbackRegion.reset(Region.release());
}
@ -113,7 +112,7 @@ protected:
MCObjectSymbolizer *MOS;
/// \brief The fallback memory region, outside the object file.
OwningPtr<MemoryObject> FallbackRegion;
std::unique_ptr<MemoryObject> FallbackRegion;
/// \brief Return a memory region suitable for reading starting at \p Addr.
/// In most cases, this returns a StringRefMemoryObject backed by the

View File

@ -41,7 +41,7 @@ protected:
const object::RelocationRef *findRelocationAt(uint64_t Addr);
const object::SectionRef *findSectionContaining(uint64_t Addr);
MCObjectSymbolizer(MCContext &Ctx, OwningPtr<MCRelocationInfo> &RelInfo,
MCObjectSymbolizer(MCContext &Ctx, std::unique_ptr<MCRelocationInfo> &RelInfo,
const object::ObjectFile *Obj);
public:
@ -63,8 +63,9 @@ public:
/// \brief Create an object symbolizer for \p Obj.
static MCObjectSymbolizer *
createObjectSymbolizer(MCContext &Ctx, OwningPtr<MCRelocationInfo> &RelInfo,
const object::ObjectFile *Obj);
createObjectSymbolizer(MCContext &Ctx,
std::unique_ptr<MCRelocationInfo> &RelInfo,
const object::ObjectFile *Obj);
private:
typedef DenseMap<uint64_t, object::RelocationRef> AddrToRelocMap;

View File

@ -130,7 +130,7 @@ public:
void emitCurrentConstantPool();
private:
OwningPtr<AssemblerConstantPools> ConstantPools;
std::unique_ptr<AssemblerConstantPools> ConstantPools;
};
/// MCStreamer - Streaming machine code generation interface. This interface
@ -144,7 +144,7 @@ private:
///
class MCStreamer {
MCContext &Context;
OwningPtr<MCTargetStreamer> TargetStreamer;
std::unique_ptr<MCTargetStreamer> TargetStreamer;
MCStreamer(const MCStreamer &) LLVM_DELETED_FUNCTION;
MCStreamer &operator=(const MCStreamer &) LLVM_DELETED_FUNCTION;

View File

@ -16,10 +16,10 @@
#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 <memory>
namespace llvm {
@ -42,11 +42,11 @@ 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);
virtual ~MCSymbolizer();
/// \brief Try to add a symbolic operand instead of \p Value to the MCInst.

View File

@ -23,8 +23,9 @@ class GlobalValue;
namespace object {
class IRObjectFile : public SymbolicFile {
OwningPtr<Module> M;
OwningPtr<Mangler> Mang;
std::unique_ptr<Module> M;
std::unique_ptr<Mangler> Mang;
public:
IRObjectFile(MemoryBuffer *Object, error_code &EC, LLVMContext &Context,
bool BufferOwned);

View File

@ -14,7 +14,6 @@
#ifndef LLVM_OBJECT_MACHOUNIVERSAL_H
#define LLVM_OBJECT_MACHOUNIVERSAL_H
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Object/Binary.h"
@ -53,7 +52,7 @@ public:
ObjectForArch getNext() const { return ObjectForArch(Parent, Index + 1); }
uint32_t getCPUType() const { return Header.cputype; }
error_code getAsObjectFile(OwningPtr<ObjectFile> &Result) const;
error_code getAsObjectFile(std::unique_ptr<ObjectFile> &Result) const;
};
class object_iterator {
@ -95,7 +94,7 @@ public:
}
error_code getObjectForArch(Triple::ArchType Arch,
OwningPtr<ObjectFile> &Result) const;
std::unique_ptr<ObjectFile> &Result) const;
};
}

View File

@ -15,11 +15,11 @@
#define LLVM_SUPPORT_COMPRESSION_H
#include "llvm/Support/DataTypes.h"
#include <memory>
namespace llvm {
class MemoryBuffer;
template<typename T> class OwningPtr;
class StringRef;
namespace zlib {
@ -43,11 +43,11 @@ enum Status {
bool isAvailable();
Status compress(StringRef InputBuffer,
OwningPtr<MemoryBuffer> &CompressedBuffer,
std::unique_ptr<MemoryBuffer> &CompressedBuffer,
CompressionLevel Level = DefaultCompression);
Status uncompress(StringRef InputBuffer,
OwningPtr<MemoryBuffer> &UncompressedBuffer,
std::unique_ptr<MemoryBuffer> &UncompressedBuffer,
size_t UncompressedSize);
uint32_t crc32(StringRef Buffer);

View File

@ -28,7 +28,6 @@
#define LLVM_SUPPORT_FILESYSTEM_H
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/DataTypes.h"

View File

@ -11,10 +11,11 @@
#ifndef LLVM_SUPPORT_STREAMABLEMEMORYOBJECT_H
#define LLVM_SUPPORT_STREAMABLEMEMORYOBJECT_H
#include "llvm/ADT/OwningPtr.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DataStream.h"
#include "llvm/Support/MemoryObject.h"
#include <cassert>
#include <memory>
#include <vector>
namespace llvm {
@ -137,7 +138,7 @@ public:
private:
const static uint32_t kChunkSize = 4096 * 4;
mutable std::vector<unsigned char> Bytes;
OwningPtr<DataStreamer> Streamer;
std::unique_ptr<DataStreamer> Streamer;
mutable size_t BytesRead; // Bytes read from stream
size_t BytesSkipped;// Bytes skipped at start of stream (e.g. wrapper/header)
mutable size_t ObjectSize; // 0 if unknown, set if wrapper seen or EOF reached

View File

@ -38,7 +38,6 @@
#ifndef LLVM_SUPPORT_YAMLPARSER_H
#define LLVM_SUPPORT_YAMLPARSER_H
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Allocator.h"
@ -96,8 +95,8 @@ public:
void printError(Node *N, const Twine &Msg);
private:
OwningPtr<Scanner> scanner;
OwningPtr<Document> CurrentDoc;
std::unique_ptr<Scanner> scanner;
std::unique_ptr<Document> CurrentDoc;
friend class Document;
};
@ -115,7 +114,7 @@ public:
NK_Alias
};
Node(unsigned int Type, OwningPtr<Document> &, StringRef Anchor,
Node(unsigned int Type, std::unique_ptr<Document> &, StringRef Anchor,
StringRef Tag);
/// @brief Get the value of the anchor attached to this node. If it does not
@ -156,7 +155,7 @@ public:
}
protected:
OwningPtr<Document> &Doc;
std::unique_ptr<Document> &Doc;
SMRange SourceRange;
void operator delete(void *) throw() {}
@ -177,7 +176,7 @@ private:
class NullNode : public Node {
void anchor() override;
public:
NullNode(OwningPtr<Document> &D)
NullNode(std::unique_ptr<Document> &D)
: Node(NK_Null, D, StringRef(), StringRef()) {}
static inline bool classof(const Node *N) {
@ -193,7 +192,7 @@ public:
class ScalarNode : public Node {
void anchor() override;
public:
ScalarNode(OwningPtr<Document> &D, StringRef Anchor, StringRef Tag,
ScalarNode(std::unique_ptr<Document> &D, StringRef Anchor, StringRef Tag,
StringRef Val)
: Node(NK_Scalar, D, Anchor, Tag), Value(Val) {
SMLoc Start = SMLoc::getFromPointer(Val.begin());
@ -235,11 +234,8 @@ private:
class KeyValueNode : public Node {
void anchor() override;
public:
KeyValueNode(OwningPtr<Document> &D)
: Node(NK_KeyValue, D, StringRef(), StringRef())
, Key(0)
, Value(0)
{}
KeyValueNode(std::unique_ptr<Document> &D)
: Node(NK_KeyValue, D, StringRef(), StringRef()), Key(0), Value(0) {}
/// @brief Parse and return the key.
///
@ -353,7 +349,7 @@ public:
MT_Inline ///< An inline mapping node is used for "[key: value]".
};
MappingNode(OwningPtr<Document> &D, StringRef Anchor, StringRef Tag,
MappingNode(std::unique_ptr<Document> &D, StringRef Anchor, StringRef Tag,
MappingType MT)
: Node(NK_Mapping, D, Anchor, Tag), Type(MT), IsAtBeginning(true),
IsAtEnd(false), CurrentEntry(0) {}
@ -410,7 +406,7 @@ public:
ST_Indentless
};
SequenceNode(OwningPtr<Document> &D, StringRef Anchor, StringRef Tag,
SequenceNode(std::unique_ptr<Document> &D, StringRef Anchor, StringRef Tag,
SequenceType ST)
: Node(NK_Sequence, D, Anchor, Tag), SeqType(ST), IsAtBeginning(true),
IsAtEnd(false),
@ -453,8 +449,8 @@ private:
class AliasNode : public Node {
void anchor() override;
public:
AliasNode(OwningPtr<Document> &D, StringRef Val)
: Node(NK_Alias, D, StringRef(), StringRef()), Name(Val) {}
AliasNode(std::unique_ptr<Document> &D, StringRef Val)
: Node(NK_Alias, D, StringRef(), StringRef()), Name(Val) {}
StringRef getName() const { return Name; }
Node *getTarget();
@ -531,7 +527,7 @@ private:
class document_iterator {
public:
document_iterator() : Doc(0) {}
document_iterator(OwningPtr<Document> &D) : Doc(&D) {}
document_iterator(std::unique_ptr<Document> &D) : Doc(&D) {}
bool operator ==(const document_iterator &Other) {
if (isAtEnd() || Other.isAtEnd())
@ -558,16 +554,14 @@ public:
return *Doc->get();
}
OwningPtr<Document> &operator ->() {
return *Doc;
}
std::unique_ptr<Document> &operator->() { return *Doc; }
private:
bool isAtEnd() const {
return !Doc || !*Doc;
}
OwningPtr<Document> *Doc;
std::unique_ptr<Document> *Doc;
};
}

View File

@ -852,15 +852,15 @@ public:
void nextDocument();
private:
llvm::SourceMgr SrcMgr; // must be before Strm
OwningPtr<llvm::yaml::Stream> Strm;
OwningPtr<HNode> TopNode;
llvm::error_code EC;
llvm::BumpPtrAllocator StringAllocator;
llvm::yaml::document_iterator DocIterator;
std::vector<bool> BitValuesUsed;
HNode *CurrentNode;
bool ScalarMatchFound;
llvm::SourceMgr SrcMgr; // must be before Strm
std::unique_ptr<llvm::yaml::Stream> Strm;
std::unique_ptr<HNode> TopNode;
llvm::error_code EC;
llvm::BumpPtrAllocator StringAllocator;
llvm::yaml::document_iterator DocIterator;
std::vector<bool> BitValuesUsed;
HNode *CurrentNode;
bool ScalarMatchFound;
};

View File

@ -59,7 +59,7 @@ INITIALIZE_PASS_END(MemoryDependenceAnalysis, "memdep",
"Memory Dependence Analysis", false, true)
MemoryDependenceAnalysis::MemoryDependenceAnalysis()
: FunctionPass(ID), PredCache(0) {
: FunctionPass(ID), PredCache() {
initializeMemoryDependenceAnalysisPass(*PassRegistry::getPassRegistry());
}
MemoryDependenceAnalysis::~MemoryDependenceAnalysis() {

View File

@ -13,7 +13,6 @@
#include "llvm/AsmParser/Parser.h"
#include "LLParser.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
@ -34,7 +33,7 @@ Module *llvm::ParseAssembly(MemoryBuffer *F,
return LLParser(F, SM, Err, M).Run() ? 0 : M;
// Otherwise create a new module.
OwningPtr<Module> M2(new Module(F->getBufferIdentifier(), Context));
std::unique_ptr<Module> M2(new Module(F->getBufferIdentifier(), Context));
if (LLParser(F, SM, Err, M2.get()).Run())
return 0;
return M2.release();
@ -42,7 +41,7 @@ Module *llvm::ParseAssembly(MemoryBuffer *F,
Module *llvm::ParseAssemblyFile(const std::string &Filename, SMDiagnostic &Err,
LLVMContext &Context) {
OwningPtr<MemoryBuffer> File;
std::unique_ptr<MemoryBuffer> File;
if (error_code ec = MemoryBuffer::getFileOrSTDIN(Filename, File)) {
Err = SMDiagnostic(Filename, SourceMgr::DK_Error,
"Could not open input file: " + ec.message());

View File

@ -127,7 +127,7 @@ class BitcodeReader : public GVMaterializer {
Module *TheModule;
MemoryBuffer *Buffer;
bool BufferOwned;
OwningPtr<BitstreamReader> StreamFile;
std::unique_ptr<BitstreamReader> StreamFile;
BitstreamCursor Stream;
DataStreamer *LazyStreamer;
uint64_t NextUnreadBit;

View File

@ -13,7 +13,6 @@
#define DEBUG_TYPE "asm-printer"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Twine.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
@ -118,16 +117,15 @@ void AsmPrinter::EmitInlineAsm(StringRef Str, const MDNode *LocMDNode,
// Tell SrcMgr about this buffer, it takes ownership of the buffer.
SrcMgr.AddNewSourceBuffer(Buffer, SMLoc());
OwningPtr<MCAsmParser> Parser(createMCAsmParser(SrcMgr,
OutContext, OutStreamer,
*MAI));
std::unique_ptr<MCAsmParser> Parser(
createMCAsmParser(SrcMgr, OutContext, OutStreamer, *MAI));
// Initialize the parser with a fresh subtarget info. It is better to use a
// new STI here because the parser may modify it and we do not want those
// modifications to persist after parsing the inlineasm. The modifications
// made by the parser will be seen by the code emitters because it passes
// the current STI down to the EncodeInstruction() method.
OwningPtr<MCSubtargetInfo> STI(TM.getTarget().createMCSubtargetInfo(
std::unique_ptr<MCSubtargetInfo> STI(TM.getTarget().createMCSubtargetInfo(
TM.getTargetTriple(), TM.getTargetCPU(), TM.getTargetFeatureString()));
// Preserve a copy of the original STI because the parser may modify it. For
@ -136,8 +134,8 @@ void AsmPrinter::EmitInlineAsm(StringRef Str, const MDNode *LocMDNode,
// emitInlineAsmEnd().
MCSubtargetInfo STIOrig = *STI;
OwningPtr<MCTargetAsmParser>
TAP(TM.getTarget().createMCAsmParser(*STI, *Parser, *MII));
std::unique_ptr<MCTargetAsmParser> TAP(
TM.getTarget().createMCAsmParser(*STI, *Parser, *MII));
if (!TAP)
report_fatal_error("Inline asm not supported by this streamer because"
" we don't have an asm parser for this target\n");

View File

@ -18,7 +18,6 @@
#include "DwarfDebug.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/DebugInfo.h"
@ -71,7 +70,7 @@ protected:
DICompileUnit CUNode;
/// Unit debug information entry.
const OwningPtr<DIE> UnitDie;
const std::unique_ptr<DIE> UnitDie;
/// Offset of the UnitDie from beginning of debug info section.
unsigned DebugInfoOffset;

View File

@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Target/TargetMachine.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineFunctionAnalysis.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
@ -174,7 +173,7 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
const MCRegisterInfo &MRI = *getRegisterInfo();
const MCInstrInfo &MII = *getInstrInfo();
const MCSubtargetInfo &STI = getSubtarget<MCSubtargetInfo>();
OwningPtr<MCStreamer> AsmStreamer;
std::unique_ptr<MCStreamer> AsmStreamer;
switch (FileType) {
case CGFT_AssemblyFile: {
@ -281,7 +280,7 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM,
if (MCE == 0 || MAB == 0)
return true;
OwningPtr<MCStreamer> AsmStreamer;
std::unique_ptr<MCStreamer> AsmStreamer;
AsmStreamer.reset(getTarget().createMCObjectStreamer(
getTargetTriple(), *Ctx, *MAB, Out, MCE, STI, hasMCRelaxAll(),
hasMCNoExecStack()));

View File

@ -67,7 +67,7 @@ void LiveRegMatrix::releaseMemory() {
Matrix[i].clear();
// No need to clear Queries here, since LiveIntervalUnion::Query doesn't
// have anything important to clear and LiveRegMatrix's runOnFunction()
// does a OwningPtr::reset anyways.
// does a std::unique_ptr::reset anyways.
}
}

View File

@ -15,7 +15,6 @@
#define DEBUG_TYPE "misched"
#include "llvm/CodeGen/MachineScheduler.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/PriorityQueue.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
@ -321,7 +320,7 @@ bool MachineScheduler::runOnMachineFunction(MachineFunction &mf) {
// Instantiate the selected scheduler for this target, function, and
// optimization level.
OwningPtr<ScheduleDAGInstrs> Scheduler(createMachineScheduler());
std::unique_ptr<ScheduleDAGInstrs> Scheduler(createMachineScheduler());
scheduleRegions(*Scheduler);
DEBUG(LIS->dump());
@ -342,7 +341,7 @@ bool PostMachineScheduler::runOnMachineFunction(MachineFunction &mf) {
// Instantiate the selected scheduler for this target, function, and
// optimization level.
OwningPtr<ScheduleDAGInstrs> Scheduler(createPostMachineScheduler());
std::unique_ptr<ScheduleDAGInstrs> Scheduler(createPostMachineScheduler());
scheduleRegions(*Scheduler);
if (VerifyScheduling)

View File

@ -37,7 +37,6 @@
#ifndef LLVM_CODEGEN_REGALLOCBASE
#define LLVM_CODEGEN_REGALLOCBASE
#include "llvm/ADT/OwningPtr.h"
#include "llvm/CodeGen/LiveInterval.h"
#include "llvm/CodeGen/RegisterClassInfo.h"

View File

@ -64,7 +64,7 @@ class RABasic : public MachineFunctionPass, public RegAllocBase
MachineFunction *MF;
// state
OwningPtr<Spiller> SpillerInstance;
std::unique_ptr<Spiller> SpillerInstance;
std::priority_queue<LiveInterval*, std::vector<LiveInterval*>,
CompSpillWeight> Queue;

View File

@ -101,7 +101,7 @@ class RAGreedy : public MachineFunctionPass,
LiveDebugVariables *DebugVars;
// state
OwningPtr<Spiller> SpillerInstance;
std::unique_ptr<Spiller> SpillerInstance;
PQueue Queue;
unsigned NextCascade;
@ -196,8 +196,8 @@ class RAGreedy : public MachineFunctionPass,
};
// splitting state.
OwningPtr<SplitAnalysis> SA;
OwningPtr<SplitEditor> SE;
std::unique_ptr<SplitAnalysis> SA;
std::unique_ptr<SplitEditor> SE;
/// Cached per-block interference maps
InterferenceCache IntfCache;

View File

@ -34,7 +34,6 @@
#include "llvm/CodeGen/RegAllocPBQP.h"
#include "RegisterCoalescer.h"
#include "Spiller.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/CodeGen/CalcSpillWeights.h"
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
@ -88,7 +87,7 @@ public:
static char ID;
/// Construct a PBQP register allocator.
RegAllocPBQP(OwningPtr<PBQPBuilder> &b, char *cPassID=0)
RegAllocPBQP(std::unique_ptr<PBQPBuilder> &b, char *cPassID=0)
: MachineFunctionPass(ID), builder(b.release()), customPassID(cPassID) {
initializeSlotIndexesPass(*PassRegistry::getPassRegistry());
initializeLiveIntervalsPass(*PassRegistry::getPassRegistry());
@ -117,8 +116,7 @@ private:
typedef std::map<RegPair, PBQP::PBQPNum> CoalesceMap;
typedef std::set<unsigned> RegSet;
OwningPtr<PBQPBuilder> builder;
std::unique_ptr<PBQPBuilder> builder;
char *customPassID;
@ -129,7 +127,7 @@ private:
MachineRegisterInfo *mri;
const MachineBlockFrequencyInfo *mbfi;
OwningPtr<Spiller> spiller;
std::unique_ptr<Spiller> spiller;
LiveIntervals *lis;
LiveStacks *lss;
VirtRegMap *vrm;
@ -191,7 +189,7 @@ PBQPRAProblem *PBQPBuilder::build(MachineFunction *mf, const LiveIntervals *lis,
MachineRegisterInfo *mri = &mf->getRegInfo();
const TargetRegisterInfo *tri = mf->getTarget().getRegisterInfo();
OwningPtr<PBQPRAProblem> p(new PBQPRAProblem());
std::unique_ptr<PBQPRAProblem> p(new PBQPRAProblem());
PBQPRAGraph &g = p->getGraph();
RegSet pregs;
@ -314,7 +312,7 @@ PBQPRAProblem *PBQPBuilderWithCoalescing::build(MachineFunction *mf,
const MachineBlockFrequencyInfo *mbfi,
const RegSet &vregs) {
OwningPtr<PBQPRAProblem> p(PBQPBuilder::build(mf, lis, mbfi, vregs));
std::unique_ptr<PBQPRAProblem> p(PBQPBuilder::build(mf, lis, mbfi, vregs));
PBQPRAGraph &g = p->getGraph();
const TargetMachine &tm = mf->getTarget();
@ -587,8 +585,8 @@ bool RegAllocPBQP::runOnMachineFunction(MachineFunction &MF) {
while (!pbqpAllocComplete) {
DEBUG(dbgs() << " PBQP Regalloc round " << round << ":\n");
OwningPtr<PBQPRAProblem> problem(
builder->build(mf, lis, mbfi, vregsToAlloc));
std::unique_ptr<PBQPRAProblem> problem(
builder->build(mf, lis, mbfi, vregsToAlloc));
#ifndef NDEBUG
if (pbqpDumpGraphs) {
@ -622,14 +620,14 @@ bool RegAllocPBQP::runOnMachineFunction(MachineFunction &MF) {
return true;
}
FunctionPass* llvm::createPBQPRegisterAllocator(
OwningPtr<PBQPBuilder> &builder,
char *customPassID) {
FunctionPass *
llvm::createPBQPRegisterAllocator(std::unique_ptr<PBQPBuilder> &builder,
char *customPassID) {
return new RegAllocPBQP(builder, customPassID);
}
FunctionPass* llvm::createDefaultPBQPRegisterAllocator() {
OwningPtr<PBQPBuilder> Builder;
std::unique_ptr<PBQPBuilder> Builder;
if (pbqpCoalescing)
Builder.reset(new PBQPBuilderWithCoalescing());
else

View File

@ -15,7 +15,6 @@
#define DEBUG_TYPE "regalloc"
#include "RegisterCoalescer.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/Statistic.h"

View File

@ -15,7 +15,6 @@
#define DEBUG_TYPE "tailduplication"
#include "llvm/CodeGen/Passes.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/Statistic.h"
@ -65,7 +64,7 @@ namespace {
const MachineBranchProbabilityInfo *MBPI;
MachineModuleInfo *MMI;
MachineRegisterInfo *MRI;
OwningPtr<RegScavenger> RS;
std::unique_ptr<RegScavenger> RS;
bool PreRegAlloc;
// SSAUpdateVRs - A list of virtual registers for which to update SSA form.

View File

@ -301,7 +301,7 @@ void DWARFContext::parseCompileUnits() {
const DataExtractor &DIData = DataExtractor(getInfoSection().Data,
isLittleEndian(), 0);
while (DIData.isValidOffset(offset)) {
OwningPtr<DWARFCompileUnit> CU(new DWARFCompileUnit(
std::unique_ptr<DWARFCompileUnit> CU(new DWARFCompileUnit(
getDebugAbbrev(), getInfoSection().Data, getAbbrevSection(),
getRangeSection(), getStringSection(), StringRef(), getAddrSection(),
&getInfoSection().Relocs, isLittleEndian()));
@ -321,7 +321,7 @@ void DWARFContext::parseTypeUnits() {
const DataExtractor &DIData =
DataExtractor(I->second.Data, isLittleEndian(), 0);
while (DIData.isValidOffset(offset)) {
OwningPtr<DWARFTypeUnit> TU(new DWARFTypeUnit(
std::unique_ptr<DWARFTypeUnit> TU(new DWARFTypeUnit(
getDebugAbbrev(), I->second.Data, getAbbrevSection(),
getRangeSection(), getStringSection(), StringRef(), getAddrSection(),
&I->second.Relocs, isLittleEndian()));
@ -338,7 +338,7 @@ void DWARFContext::parseDWOCompileUnits() {
const DataExtractor &DIData =
DataExtractor(getInfoDWOSection().Data, isLittleEndian(), 0);
while (DIData.isValidOffset(offset)) {
OwningPtr<DWARFCompileUnit> DWOCU(new DWARFCompileUnit(
std::unique_ptr<DWARFCompileUnit> DWOCU(new DWARFCompileUnit(
getDebugAbbrevDWO(), getInfoDWOSection().Data, getAbbrevDWOSection(),
getRangeDWOSection(), getStringDWOSection(),
getStringOffsetDWOSection(), getAddrSection(),
@ -359,7 +359,7 @@ void DWARFContext::parseDWOTypeUnits() {
const DataExtractor &DIData =
DataExtractor(I->second.Data, isLittleEndian(), 0);
while (DIData.isValidOffset(offset)) {
OwningPtr<DWARFTypeUnit> TU(new DWARFTypeUnit(
std::unique_ptr<DWARFTypeUnit> TU(new DWARFTypeUnit(
getDebugAbbrevDWO(), I->second.Data, getAbbrevDWOSection(),
getRangeDWOSection(), getStringDWOSection(),
getStringOffsetDWOSection(), getAddrSection(), &I->second.Relocs,
@ -629,7 +629,7 @@ DWARFContextInMemory::DWARFContextInMemory(object::ObjectFile *Obj) :
if (!zlib::isAvailable() ||
!consumeCompressedDebugSectionHeader(data, OriginalSize))
continue;
OwningPtr<MemoryBuffer> UncompressedSection;
std::unique_ptr<MemoryBuffer> UncompressedSection;
if (zlib::uncompress(data, UncompressedSection, OriginalSize) !=
zlib::StatusOK)
continue;

View File

@ -18,7 +18,6 @@
#include "DWARFDebugRangeList.h"
#include "DWARFTypeUnit.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/DebugInfo/DIContext.h"
@ -31,15 +30,15 @@ namespace llvm {
class DWARFContext : public DIContext {
SmallVector<DWARFCompileUnit *, 1> CUs;
SmallVector<DWARFTypeUnit *, 1> TUs;
OwningPtr<DWARFDebugAbbrev> Abbrev;
OwningPtr<DWARFDebugLoc> Loc;
OwningPtr<DWARFDebugAranges> Aranges;
OwningPtr<DWARFDebugLine> Line;
OwningPtr<DWARFDebugFrame> DebugFrame;
std::unique_ptr<DWARFDebugAbbrev> Abbrev;
std::unique_ptr<DWARFDebugLoc> Loc;
std::unique_ptr<DWARFDebugAranges> Aranges;
std::unique_ptr<DWARFDebugLine> Line;
std::unique_ptr<DWARFDebugFrame> DebugFrame;
SmallVector<DWARFCompileUnit *, 1> DWOCUs;
SmallVector<DWARFTypeUnit *, 1> DWOTUs;
OwningPtr<DWARFDebugAbbrev> AbbrevDWO;
std::unique_ptr<DWARFDebugAbbrev> AbbrevDWO;
DWARFContext(DWARFContext &) LLVM_DELETED_FUNCTION;
DWARFContext &operator=(DWARFContext &) LLVM_DELETED_FUNCTION;

View File

@ -14,7 +14,6 @@
#include "DWARFDebugInfoEntry.h"
#include "DWARFDebugRangeList.h"
#include "DWARFRelocMap.h"
#include "llvm/ADT/OwningPtr.h"
#include <vector>
namespace llvm {
@ -50,14 +49,14 @@ class DWARFUnit {
std::vector<DWARFDebugInfoEntryMinimal> DieArray;
class DWOHolder {
OwningPtr<object::ObjectFile> DWOFile;
OwningPtr<DWARFContext> DWOContext;
std::unique_ptr<object::ObjectFile> DWOFile;
std::unique_ptr<DWARFContext> DWOContext;
DWARFUnit *DWOU;
public:
DWOHolder(object::ObjectFile *DWOFile);
DWARFUnit *getUnit() const { return DWOU; }
};
OwningPtr<DWOHolder> DWO;
std::unique_ptr<DWOHolder> DWO;
protected:
virtual bool extractImpl(DataExtractor debug_info, uint32_t *offset_ptr);

View File

@ -443,7 +443,7 @@ ExecutionEngine *ExecutionEngine::createJIT(Module *M,
}
ExecutionEngine *EngineBuilder::create(TargetMachine *TM) {
OwningPtr<TargetMachine> TheTM(TM); // Take ownership.
std::unique_ptr<TargetMachine> TheTM(TM); // Take ownership.
// Make sure we can resolve symbols in the program as well. The zero arg
// to the function tells DynamicLibrary to load the program, not a library.

View File

@ -20,7 +20,6 @@
#include "llvm/IR/Function.h"
#include "llvm/IR/Metadata.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/DebugInfo/DIContext.h"
#include "llvm/ExecutionEngine/ObjectImage.h"
@ -40,7 +39,7 @@ namespace {
class IntelJITEventListener : public JITEventListener {
typedef DenseMap<void*, unsigned int> MethodIDMap;
OwningPtr<IntelJITEventsWrapper> Wrapper;
std::unique_ptr<IntelJITEventsWrapper> Wrapper;
MethodIDMap MethodIDs;
FilenameCache Filenames;

View File

@ -15,7 +15,6 @@
#define DEBUG_TYPE "jit"
#include "JIT.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"

View File

@ -146,7 +146,7 @@ ObjectBufferStream* MCJIT::emitObject(Module *M) {
PM.add(new DataLayoutPass(M));
// The RuntimeDyld will take ownership of this shortly
OwningPtr<ObjectBufferStream> CompiledObject(new ObjectBufferStream());
std::unique_ptr<ObjectBufferStream> CompiledObject(new ObjectBufferStream());
// Turn the machine code intermediate representation into bytes in memory
// that may be executed.
@ -164,7 +164,7 @@ ObjectBufferStream* MCJIT::emitObject(Module *M) {
if (ObjCache) {
// MemoryBuffer is a thin wrapper around the actual memory, so it's OK
// to create a temporary object here and delete it after the call.
OwningPtr<MemoryBuffer> MB(CompiledObject->getMemBuffer());
std::unique_ptr<MemoryBuffer> MB(CompiledObject->getMemBuffer());
ObjCache->notifyObjectCompiled(M, MB.get());
}
@ -183,10 +183,10 @@ void MCJIT::generateCodeForModule(Module *M) {
if (OwnedModules.hasModuleBeenLoaded(M))
return;
OwningPtr<ObjectBuffer> ObjectToLoad;
std::unique_ptr<ObjectBuffer> ObjectToLoad;
// Try to load the pre-compiled object from cache if possible
if (0 != ObjCache) {
OwningPtr<MemoryBuffer> PreCompiledObject(ObjCache->getObject(M));
std::unique_ptr<MemoryBuffer> PreCompiledObject(ObjCache->getObject(M));
if (0 != PreCompiledObject.get())
ObjectToLoad.reset(new ObjectBuffer(PreCompiledObject.release()));
}
@ -304,7 +304,7 @@ uint64_t MCJIT::getSymbolAddress(const std::string &Name,
// Look for our symbols in each Archive
object::Archive::child_iterator ChildIt = A->findSym(Name);
if (ChildIt != A->child_end()) {
OwningPtr<object::Binary> ChildBin;
std::unique_ptr<object::Binary> ChildBin;
// FIXME: Support nested archives?
if (!ChildIt->getAsBinary(ChildBin) && ChildBin->isObject()) {
object::ObjectFile *OF = reinterpret_cast<object::ObjectFile *>(

View File

@ -76,7 +76,7 @@ public:
private:
MCJIT *ParentEngine;
OwningPtr<RTDyldMemoryManager> ClientMM;
std::unique_ptr<RTDyldMemoryManager> ClientMM;
};
// About Module states: added->loaded->finalized.

View File

@ -18,7 +18,6 @@
#define DEBUG_TYPE "oprofile-jit-event-listener"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/ExecutionEngine/ObjectImage.h"
#include "llvm/ExecutionEngine/OProfileWrapper.h"
@ -229,7 +228,8 @@ void OProfileJITEventListener::NotifyFreeingObject(const ObjectImage &Obj) {
namespace llvm {
JITEventListener *JITEventListener::createOProfileJITEventListener() {
static OwningPtr<OProfileWrapper> JITProfilingWrapper(new OProfileWrapper);
static std::unique_ptr<OProfileWrapper> JITProfilingWrapper(
new OProfileWrapper);
return new OProfileJITEventListener(*JITProfilingWrapper);
}

View File

@ -96,7 +96,7 @@ ObjectImage *RuntimeDyldImpl::loadObject(ObjectBuffer *InputBuffer) {
ObjectImage *RuntimeDyldImpl::loadObject(ObjectImage *InputObject) {
MutexGuard locked(lock);
OwningPtr<ObjectImage> Obj(InputObject);
std::unique_ptr<ObjectImage> Obj(InputObject);
if (!Obj)
return NULL;

View File

@ -16,7 +16,6 @@
#include "JITRegistrar.h"
#include "ObjectImageCommon.h"
#include "llvm/ADT/IntervalMap.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"

View File

@ -13,7 +13,6 @@
#define DEBUG_TYPE "dyld"
#include "RuntimeDyldMachO.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
using namespace llvm;

View File

@ -16,7 +16,6 @@
#define LLVM_IR_ASSEMBLYWRITER_H
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/TypeFinder.h"
@ -67,7 +66,7 @@ protected:
const Module *TheModule;
private:
OwningPtr<SlotTracker> ModuleSlotTracker;
std::unique_ptr<SlotTracker> ModuleSlotTracker;
SlotTracker &Machine;
TypePrinting TypePrinter;
AssemblyAnnotationWriter *AnnotationWriter;

View File

@ -2536,7 +2536,7 @@ LLVMBool LLVMCreateMemoryBufferWithContentsOfFile(
LLVMMemoryBufferRef *OutMemBuf,
char **OutMessage) {
OwningPtr<MemoryBuffer> MB;
std::unique_ptr<MemoryBuffer> MB;
error_code ec;
if (!(ec = MemoryBuffer::getFile(Path, MB))) {
*OutMemBuf = wrap(MB.release());
@ -2549,7 +2549,7 @@ LLVMBool LLVMCreateMemoryBufferWithContentsOfFile(
LLVMBool LLVMCreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef *OutMemBuf,
char **OutMessage) {
OwningPtr<MemoryBuffer> MB;
std::unique_ptr<MemoryBuffer> MB;
error_code ec;
if (!(ec = MemoryBuffer::getSTDIN(MB))) {
*OutMemBuf = wrap(MB.release());

View File

@ -13,7 +13,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/GCOV.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/FileSystem.h"
@ -472,7 +471,7 @@ void FileInfo::print(StringRef GCNOFile, StringRef GCDAFile) {
for (StringMap<LineData>::const_iterator I = LineInfo.begin(),
E = LineInfo.end(); I != E; ++I) {
StringRef Filename = I->first();
OwningPtr<MemoryBuffer> Buff;
std::unique_ptr<MemoryBuffer> Buff;
if (error_code ec = MemoryBuffer::getFileOrSTDIN(Filename, Buff)) {
errs() << Filename << ": " << ec.message() << "\n";
return;

View File

@ -43,7 +43,7 @@ template class llvm::SymbolTableListTraits<GlobalAlias, Module>;
//
Module::Module(StringRef MID, LLVMContext &C)
: Context(C), Materializer(NULL), ModuleID(MID), DL("") {
: Context(C), Materializer(), ModuleID(MID), DL("") {
ValSymTab = new ValueSymbolTable();
NamedMDSymTab = new StringMap<NamedMDNode *>();
Context.addModule(this);

View File

@ -10,7 +10,6 @@
#include "llvm/IRReader/IRReader.h"
#include "llvm-c/Core.h"
#include "llvm-c/IRReader.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/IR/LLVMContext.h"
@ -53,7 +52,7 @@ Module *llvm::getLazyIRModule(MemoryBuffer *Buffer, SMDiagnostic &Err,
Module *llvm::getLazyIRFileModule(const std::string &Filename, SMDiagnostic &Err,
LLVMContext &Context) {
OwningPtr<MemoryBuffer> File;
std::unique_ptr<MemoryBuffer> File;
if (error_code ec = MemoryBuffer::getFileOrSTDIN(Filename, File)) {
Err = SMDiagnostic(Filename, SourceMgr::DK_Error,
"Could not open input file: " + ec.message());
@ -86,7 +85,7 @@ Module *llvm::ParseIR(MemoryBuffer *Buffer, SMDiagnostic &Err,
Module *llvm::ParseIRFile(const std::string &Filename, SMDiagnostic &Err,
LLVMContext &Context) {
OwningPtr<MemoryBuffer> File;
std::unique_ptr<MemoryBuffer> File;
if (error_code ec = MemoryBuffer::getFileOrSTDIN(Filename, File)) {
Err = SMDiagnostic(Filename, SourceMgr::DK_Error,
"Could not open input file: " + ec.message());

View File

@ -264,7 +264,7 @@ const void* LTOCodeGenerator::compile(size_t* length,
delete NativeObjectFile;
// read .o file into memory buffer
OwningPtr<MemoryBuffer> BuffPtr;
std::unique_ptr<MemoryBuffer> BuffPtr;
if (error_code ec = MemoryBuffer::getFile(name, BuffPtr, -1, false)) {
errMsg = ec.message();
sys::fs::remove(NativeObjectPath);

View File

@ -13,7 +13,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/LTO/LTOModule.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/IR/Constants.h"
@ -80,7 +79,7 @@ bool LTOModule::isBitcodeFileForTarget(const void *mem, size_t length,
bool LTOModule::isBitcodeFileForTarget(const char *path,
const char *triplePrefix) {
OwningPtr<MemoryBuffer> buffer;
std::unique_ptr<MemoryBuffer> buffer;
if (MemoryBuffer::getFile(path, buffer))
return false;
return isTargetMatch(buffer.release(), triplePrefix);
@ -98,7 +97,7 @@ bool LTOModule::isTargetMatch(MemoryBuffer *buffer, const char *triplePrefix) {
/// the buffer.
LTOModule *LTOModule::makeLTOModule(const char *path, TargetOptions options,
std::string &errMsg) {
OwningPtr<MemoryBuffer> buffer;
std::unique_ptr<MemoryBuffer> buffer;
if (error_code ec = MemoryBuffer::getFile(path, buffer)) {
errMsg = ec.message();
return NULL;
@ -117,7 +116,7 @@ LTOModule *LTOModule::makeLTOModule(int fd, const char *path,
off_t offset,
TargetOptions options,
std::string &errMsg) {
OwningPtr<MemoryBuffer> buffer;
std::unique_ptr<MemoryBuffer> buffer;
if (error_code ec =
MemoryBuffer::getOpenFileSlice(fd, path, buffer, map_size, offset)) {
errMsg = ec.message();
@ -129,7 +128,7 @@ LTOModule *LTOModule::makeLTOModule(int fd, const char *path,
LTOModule *LTOModule::makeLTOModule(const void *mem, size_t length,
TargetOptions options,
std::string &errMsg, StringRef path) {
OwningPtr<MemoryBuffer> buffer(makeBuffer(mem, length, path));
std::unique_ptr<MemoryBuffer> buffer(makeBuffer(mem, length, path));
if (!buffer)
return NULL;
return makeLTOModule(buffer.release(), options, errMsg);
@ -146,7 +145,7 @@ LTOModule *LTOModule::makeLTOModule(MemoryBuffer *buffer,
delete buffer;
return NULL;
}
OwningPtr<Module> m(ModuleOrErr.get());
std::unique_ptr<Module> m(ModuleOrErr.get());
std::string TripleStr = m->getTargetTriple();
if (TripleStr.empty())
@ -725,20 +724,19 @@ bool LTOModule::addAsmGlobalSymbols(std::string &errMsg) {
if (inlineAsm.empty())
return false;
OwningPtr<RecordStreamer> Streamer(new RecordStreamer(_context));
std::unique_ptr<RecordStreamer> Streamer(new RecordStreamer(_context));
MemoryBuffer *Buffer = MemoryBuffer::getMemBuffer(inlineAsm);
SourceMgr SrcMgr;
SrcMgr.AddNewSourceBuffer(Buffer, SMLoc());
OwningPtr<MCAsmParser> Parser(createMCAsmParser(SrcMgr,
_context, *Streamer,
*_target->getMCAsmInfo()));
std::unique_ptr<MCAsmParser> Parser(
createMCAsmParser(SrcMgr, _context, *Streamer, *_target->getMCAsmInfo()));
const Target &T = _target->getTarget();
OwningPtr<MCInstrInfo> MCII(T.createMCInstrInfo());
OwningPtr<MCSubtargetInfo>
STI(T.createMCSubtargetInfo(_target->getTargetTriple(),
_target->getTargetCPU(),
_target->getTargetFeatureString()));
OwningPtr<MCTargetAsmParser> TAP(T.createMCAsmParser(*STI, *Parser.get(), *MCII));
std::unique_ptr<MCInstrInfo> MCII(T.createMCInstrInfo());
std::unique_ptr<MCSubtargetInfo> STI(T.createMCSubtargetInfo(
_target->getTargetTriple(), _target->getTargetCPU(),
_target->getTargetFeatureString()));
std::unique_ptr<MCTargetAsmParser> TAP(
T.createMCAsmParser(*STI, *Parser.get(), *MCII));
if (!TAP) {
errMsg = "target " + std::string(T.getName()) +
" does not define AsmParser.";

View File

@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/MC/MCELFObjectWriter.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallString.h"
@ -79,7 +78,7 @@ class ELFObjectWriter : public MCObjectWriter {
};
/// The target specific ELF writer instance.
llvm::OwningPtr<MCELFObjectTargetWriter> TargetObjectWriter;
std::unique_ptr<MCELFObjectTargetWriter> TargetObjectWriter;
SmallPtrSet<const MCSymbol *, 16> UsedInReloc;
SmallPtrSet<const MCSymbol *, 16> WeakrefUsedInReloc;

View File

@ -8,7 +8,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/MC/MCStreamer.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Twine.h"
@ -41,9 +40,9 @@ protected:
formatted_raw_ostream &OS;
const MCAsmInfo *MAI;
private:
OwningPtr<MCInstPrinter> InstPrinter;
OwningPtr<MCCodeEmitter> Emitter;
OwningPtr<MCAsmBackend> AsmBackend;
std::unique_ptr<MCInstPrinter> InstPrinter;
std::unique_ptr<MCCodeEmitter> Emitter;
std::unique_ptr<MCAsmBackend> AsmBackend;
SmallString<128> CommentToEmit;
raw_svector_ostream CommentStream;

View File

@ -16,13 +16,9 @@ using namespace llvm;
MCDisassembler::~MCDisassembler() {
}
void
MCDisassembler::setupForSymbolicDisassembly(
LLVMOpInfoCallback GetOpInfo,
LLVMSymbolLookupCallback SymbolLookUp,
void *DisInfo,
MCContext *Ctx,
OwningPtr<MCRelocationInfo> &RelInfo) {
void MCDisassembler::setupForSymbolicDisassembly(
LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp,
void *DisInfo, MCContext *Ctx, std::unique_ptr<MCRelocationInfo> &RelInfo) {
this->GetOpInfo = GetOpInfo;
this->SymbolLookUp = SymbolLookUp;
this->DisInfo = DisInfo;
@ -33,16 +29,12 @@ MCDisassembler::setupForSymbolicDisassembly(
SymbolLookUp, DisInfo));
}
void
MCDisassembler::setupForSymbolicDisassembly(
LLVMOpInfoCallback GetOpInfo,
LLVMSymbolLookupCallback SymbolLookUp,
void *DisInfo,
MCContext *Ctx,
std::unique_ptr<MCRelocationInfo> &RelInfo) {
OwningPtr<MCRelocationInfo> MCRI;
void MCDisassembler::setupForSymbolicDisassembly(
LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp,
void *DisInfo, MCContext *Ctx, OwningPtr<MCRelocationInfo> &RelInfo) {
std::unique_ptr<MCRelocationInfo> MCRI;
setupForSymbolicDisassembly(GetOpInfo, SymbolLookUp, DisInfo, Ctx, MCRI);
RelInfo = MCRI.take_unique();
RelInfo = std::move(MCRI);
}
bool MCDisassembler::tryAddingSymbolicOperand(MCInst &Inst, int64_t Value,
@ -63,6 +55,6 @@ void MCDisassembler::tryAddingPcLoadReferenceComment(int64_t Value,
Symbolizer->tryAddingPcLoadReferenceComment(cStream, Value, Address);
}
void MCDisassembler::setSymbolizer(OwningPtr<MCSymbolizer> &Symzer) {
void MCDisassembler::setSymbolizer(std::unique_ptr<MCSymbolizer> &Symzer) {
Symbolizer.reset(Symzer.release());
}

View File

@ -77,14 +77,13 @@ LLVMDisasmContextRef LLVMCreateDisasmCPU(const char *Triple, const char *CPU,
if (!DisAsm)
return 0;
OwningPtr<MCRelocationInfo> RelInfo(
TheTarget->createMCRelocationInfo(Triple, *Ctx));
std::unique_ptr<MCRelocationInfo> RelInfo(
TheTarget->createMCRelocationInfo(Triple, *Ctx));
if (!RelInfo)
return 0;
OwningPtr<MCSymbolizer> Symbolizer(
TheTarget->createMCSymbolizer(Triple, GetOpInfo, SymbolLookUp, DisInfo,
Ctx, RelInfo.release()));
std::unique_ptr<MCSymbolizer> Symbolizer(TheTarget->createMCSymbolizer(
Triple, GetOpInfo, SymbolLookUp, DisInfo, Ctx, RelInfo.release()));
DisAsm->setSymbolizer(Symbolizer);
DisAsm->setupForSymbolicDisassembly(GetOpInfo, SymbolLookUp, DisInfo,
Ctx, RelInfo);

View File

@ -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.

View File

@ -191,7 +191,7 @@ MCSymbolizer *createMCSymbolizer(StringRef TT, LLVMOpInfoCallback GetOpInfo,
MCRelocationInfo *RelInfo) {
assert(Ctx != 0 && "No MCContext given for symbolic disassembly");
OwningPtr<MCRelocationInfo> RelInfoOwingPtr(RelInfo);
std::unique_ptr<MCRelocationInfo> RelInfoOwingPtr(RelInfo);
return new MCExternalSymbolizer(*Ctx, RelInfoOwingPtr, GetOpInfo,
SymbolLookUp, DisInfo);
}

View File

@ -442,7 +442,7 @@ StringRef mcmodule2yaml(raw_ostream &OS, const MCModule &MCM,
return "";
}
StringRef yaml2mcmodule(OwningPtr<MCModule> &MCM, StringRef YamlContent,
StringRef yaml2mcmodule(std::unique_ptr<MCModule> &MCM, StringRef YamlContent,
const MCInstrInfo &MII, const MCRegisterInfo &MRI) {
MCM.reset(new MCModule);
YAML2MCModule Parser(*MCM);

View File

@ -34,7 +34,8 @@ class MCMachObjectSymbolizer : public MCObjectSymbolizer {
uint64_t StubsIndSymIndex;
public:
MCMachObjectSymbolizer(MCContext &Ctx, OwningPtr<MCRelocationInfo> &RelInfo,
MCMachObjectSymbolizer(MCContext &Ctx,
std::unique_ptr<MCRelocationInfo> &RelInfo,
const MachOObjectFile *MOOF);
StringRef findExternalFunctionAt(uint64_t Addr) override;
@ -44,12 +45,11 @@ public:
};
} // End unnamed namespace
MCMachObjectSymbolizer::
MCMachObjectSymbolizer(MCContext &Ctx, OwningPtr<MCRelocationInfo> &RelInfo,
const MachOObjectFile *MOOF)
: MCObjectSymbolizer(Ctx, RelInfo, MOOF), MOOF(MOOF),
StubsStart(0), StubsCount(0), StubSize(0), StubsIndSymIndex(0) {
MCMachObjectSymbolizer::MCMachObjectSymbolizer(
MCContext &Ctx, std::unique_ptr<MCRelocationInfo> &RelInfo,
const MachOObjectFile *MOOF)
: MCObjectSymbolizer(Ctx, RelInfo, MOOF), MOOF(MOOF), StubsStart(0),
StubsCount(0), StubSize(0), StubsIndSymIndex(0) {
for (section_iterator SI = MOOF->section_begin(), SE = MOOF->section_end();
SI != SE; ++SI) {
@ -120,11 +120,10 @@ tryAddingPcLoadReferenceComment(raw_ostream &cStream, int64_t Value,
//===- MCObjectSymbolizer -------------------------------------------------===//
MCObjectSymbolizer::MCObjectSymbolizer(MCContext &Ctx,
OwningPtr<MCRelocationInfo> &RelInfo,
const ObjectFile *Obj)
: MCSymbolizer(Ctx, RelInfo), Obj(Obj), SortedSections(), AddrToReloc() {
}
MCObjectSymbolizer::MCObjectSymbolizer(
MCContext &Ctx, std::unique_ptr<MCRelocationInfo> &RelInfo,
const ObjectFile *Obj)
: MCSymbolizer(Ctx, RelInfo), Obj(Obj), SortedSections(), AddrToReloc() {}
bool MCObjectSymbolizer::
tryAddingSymbolicOperand(MCInst &MI, raw_ostream &cStream,
@ -188,10 +187,9 @@ StringRef MCObjectSymbolizer::findExternalFunctionAt(uint64_t Addr) {
return StringRef();
}
MCObjectSymbolizer *
MCObjectSymbolizer::createObjectSymbolizer(MCContext &Ctx,
OwningPtr<MCRelocationInfo> &RelInfo,
const ObjectFile *Obj) {
MCObjectSymbolizer *MCObjectSymbolizer::createObjectSymbolizer(
MCContext &Ctx, std::unique_ptr<MCRelocationInfo> &RelInfo,
const ObjectFile *Obj) {
if (const MachOObjectFile *MOOF = dyn_cast<MachOObjectFile>(Obj))
return new MCMachObjectSymbolizer(Ctx, RelInfo, MOOF);
return new MCObjectSymbolizer(Ctx, RelInfo, Obj);

View File

@ -12,9 +12,9 @@
using namespace llvm;
MCSymbolizer::MCSymbolizer(MCContext &Ctx, OwningPtr<MCRelocationInfo> &RelInfo)
: Ctx(Ctx), RelInfo(RelInfo.release()) {
}
MCSymbolizer::MCSymbolizer(MCContext &Ctx,
std::unique_ptr<MCRelocationInfo> &RelInfo)
: Ctx(Ctx), RelInfo(RelInfo.release()) {}
MCSymbolizer::~MCSymbolizer() {
}

View File

@ -15,7 +15,6 @@
#include "llvm/MC/MCWinCOFFObjectWriter.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
@ -125,7 +124,7 @@ public:
typedef DenseMap<MCSymbol const *, COFFSymbol *> symbol_map;
typedef DenseMap<MCSection const *, COFFSection *> section_map;
llvm::OwningPtr<MCWinCOFFObjectTargetWriter> TargetObjectWriter;
std::unique_ptr<MCWinCOFFObjectTargetWriter> TargetObjectWriter;
// Root level file contents.
COFF::header Header;

View File

@ -43,7 +43,7 @@ StringRef Binary::getFileName() const {
ErrorOr<Binary *> object::createBinary(MemoryBuffer *Source,
LLVMContext *Context) {
OwningPtr<MemoryBuffer> scopedSource(Source);
std::unique_ptr<MemoryBuffer> scopedSource(Source);
sys::fs::file_magic Type = sys::fs::identify_magic(Source->getBuffer());
switch (Type) {
@ -80,7 +80,7 @@ ErrorOr<Binary *> object::createBinary(MemoryBuffer *Source,
}
ErrorOr<Binary *> object::createBinary(StringRef Path) {
OwningPtr<MemoryBuffer> File;
std::unique_ptr<MemoryBuffer> File;
if (error_code EC = MemoryBuffer::getFileOrSTDIN(Path, File))
return EC;
return createBinary(File.release());

View File

@ -1068,7 +1068,8 @@ error_code ExportDirectoryEntryRef::getSymbolName(StringRef &Result) const {
ErrorOr<ObjectFile *> ObjectFile::createCOFFObjectFile(MemoryBuffer *Object,
bool BufferOwned) {
error_code EC;
OwningPtr<COFFObjectFile> Ret(new COFFObjectFile(Object, EC, BufferOwned));
std::unique_ptr<COFFObjectFile> Ret(
new COFFObjectFile(Object, EC, BufferOwned));
if (EC)
return EC;
return Ret.release();

View File

@ -24,7 +24,7 @@ ErrorOr<ObjectFile *> ObjectFile::createELFObjectFile(MemoryBuffer *Obj,
1ULL << countTrailingZeros(uintptr_t(Obj->getBufferStart()));
error_code EC;
OwningPtr<ObjectFile> R;
std::unique_ptr<ObjectFile> R;
if (Ident.first == ELF::ELFCLASS32 && Ident.second == ELF::ELFDATA2LSB)
#if !LLVM_IS_UNALIGNED_ACCESS_FAST
if (MaxAlignment >= 4)

View File

@ -144,7 +144,7 @@ basic_symbol_iterator IRObjectFile::symbol_end_impl() const {
ErrorOr<SymbolicFile *> llvm::object::SymbolicFile::createIRObjectFile(
MemoryBuffer *Object, LLVMContext &Context, bool BufferOwned) {
error_code EC;
OwningPtr<IRObjectFile> Ret(
std::unique_ptr<IRObjectFile> Ret(
new IRObjectFile(Object, EC, Context, BufferOwned));
if (EC)
return EC;

View File

@ -1549,7 +1549,7 @@ ErrorOr<ObjectFile *> ObjectFile::createMachOObjectFile(MemoryBuffer *Buffer,
bool BufferOwned) {
StringRef Magic = Buffer->getBuffer().slice(0, 4);
error_code EC;
OwningPtr<MachOObjectFile> Ret;
std::unique_ptr<MachOObjectFile> Ret;
if (Magic == "\xFE\xED\xFA\xCE")
Ret.reset(new MachOObjectFile(Buffer, false, false, EC, BufferOwned));
else if (Magic == "\xCE\xFA\xED\xFE")

View File

@ -72,7 +72,7 @@ MachOUniversalBinary::ObjectForArch::ObjectForArch(
}
error_code MachOUniversalBinary::ObjectForArch::getAsObjectFile(
OwningPtr<ObjectFile> &Result) const {
std::unique_ptr<ObjectFile> &Result) const {
if (Parent) {
StringRef ParentData = Parent->getData();
StringRef ObjectData = ParentData.substr(Header.offset, Header.size);
@ -95,7 +95,8 @@ void MachOUniversalBinary::anchor() { }
ErrorOr<MachOUniversalBinary *>
MachOUniversalBinary::create(MemoryBuffer *Source) {
error_code EC;
OwningPtr<MachOUniversalBinary> Ret(new MachOUniversalBinary(Source, EC));
std::unique_ptr<MachOUniversalBinary> Ret(
new MachOUniversalBinary(Source, EC));
if (EC)
return EC;
return Ret.release();
@ -134,9 +135,8 @@ static bool getCTMForArch(Triple::ArchType Arch, MachO::CPUType &CTM) {
}
}
error_code
MachOUniversalBinary::getObjectForArch(Triple::ArchType Arch,
OwningPtr<ObjectFile> &Result) const {
error_code MachOUniversalBinary::getObjectForArch(
Triple::ArchType Arch, std::unique_ptr<ObjectFile> &Result) const {
MachO::CPUType CTM;
if (!getCTMForArch(Arch, CTM))
return object_error::arch_not_found;

View File

@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Object/ObjectFile.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
@ -87,7 +86,7 @@ ErrorOr<ObjectFile *> ObjectFile::createObjectFile(MemoryBuffer *Object,
}
ErrorOr<ObjectFile *> ObjectFile::createObjectFile(StringRef ObjectPath) {
OwningPtr<MemoryBuffer> File;
std::unique_ptr<MemoryBuffer> File;
if (error_code EC = MemoryBuffer::getFile(ObjectPath, File))
return EC;
return createObjectFile(File.release());

View File

@ -18,7 +18,6 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringMap.h"
@ -620,7 +619,7 @@ void cl::TokenizeWindowsCommandLine(StringRef Src, StringSaver &Saver,
static bool ExpandResponseFile(const char *FName, StringSaver &Saver,
TokenizerCallback Tokenizer,
SmallVectorImpl<const char *> &NewArgv) {
OwningPtr<MemoryBuffer> MemBuf;
std::unique_ptr<MemoryBuffer> MemBuf;
if (MemoryBuffer::getFile(FName, MemBuf))
return false;
StringRef Str(MemBuf->getBufferStart(), MemBuf->getBufferSize());

View File

@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/Compression.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Config/config.h"
#include "llvm/Support/Compiler.h"
@ -48,10 +47,10 @@ static zlib::Status encodeZlibReturnValue(int ReturnValue) {
bool zlib::isAvailable() { return true; }
zlib::Status zlib::compress(StringRef InputBuffer,
OwningPtr<MemoryBuffer> &CompressedBuffer,
std::unique_ptr<MemoryBuffer> &CompressedBuffer,
CompressionLevel Level) {
unsigned long CompressedSize = ::compressBound(InputBuffer.size());
OwningArrayPtr<char> TmpBuffer(new char[CompressedSize]);
std::unique_ptr<char[]> TmpBuffer(new char[CompressedSize]);
int CLevel = encodeZlibCompressionLevel(Level);
Status Res = encodeZlibReturnValue(::compress2(
(Bytef *)TmpBuffer.get(), &CompressedSize,
@ -66,9 +65,9 @@ zlib::Status zlib::compress(StringRef InputBuffer,
}
zlib::Status zlib::uncompress(StringRef InputBuffer,
OwningPtr<MemoryBuffer> &UncompressedBuffer,
std::unique_ptr<MemoryBuffer> &UncompressedBuffer,
size_t UncompressedSize) {
OwningArrayPtr<char> TmpBuffer(new char[UncompressedSize]);
std::unique_ptr<char[]> TmpBuffer(new char[UncompressedSize]);
Status Res = encodeZlibReturnValue(
::uncompress((Bytef *)TmpBuffer.get(), (uLongf *)&UncompressedSize,
(const Bytef *)InputBuffer.data(), InputBuffer.size()));
@ -88,12 +87,12 @@ uint32_t zlib::crc32(StringRef Buffer) {
#else
bool zlib::isAvailable() { return false; }
zlib::Status zlib::compress(StringRef InputBuffer,
OwningPtr<MemoryBuffer> &CompressedBuffer,
std::unique_ptr<MemoryBuffer> &CompressedBuffer,
CompressionLevel Level) {
return zlib::StatusUnsupported;
}
zlib::Status zlib::uncompress(StringRef InputBuffer,
OwningPtr<MemoryBuffer> &UncompressedBuffer,
std::unique_ptr<MemoryBuffer> &UncompressedBuffer,
size_t UncompressedSize) {
return zlib::StatusUnsupported;
}

View File

@ -13,7 +13,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/FileUtilities.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
@ -177,13 +176,13 @@ int llvm::DiffFilesWithTolerance(StringRef NameA,
std::string *Error) {
// Now its safe to mmap the files into memory because both files
// have a non-zero size.
OwningPtr<MemoryBuffer> F1;
std::unique_ptr<MemoryBuffer> F1;
if (error_code ec = MemoryBuffer::getFile(NameA, F1)) {
if (Error)
*Error = ec.message();
return 2;
}
OwningPtr<MemoryBuffer> F2;
std::unique_ptr<MemoryBuffer> F2;
if (error_code ec = MemoryBuffer::getFile(NameB, F2)) {
if (Error)
*Error = ec.message();

View File

@ -36,7 +36,7 @@ LockFileManager::readLockFile(StringRef LockFileName) {
// Read the owning host and PID out of the lock file. If it appears that the
// owning process is dead, the lock file is invalid.
OwningPtr<MemoryBuffer> MB;
std::unique_ptr<MemoryBuffer> MB;
if (MemoryBuffer::getFile(LockFileName, MB))
return None;

View File

@ -14,7 +14,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/SourceMgr.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/Locale.h"
@ -55,7 +54,7 @@ SourceMgr::~SourceMgr() {
size_t SourceMgr::AddIncludeFile(const std::string &Filename,
SMLoc IncludeLoc,
std::string &IncludedFile) {
OwningPtr<MemoryBuffer> NewBuf;
std::unique_ptr<MemoryBuffer> NewBuf;
IncludedFile = Filename;
MemoryBuffer::getFile(IncludedFile.c_str(), NewBuf);

View File

@ -10,7 +10,6 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/edit_distance.h"
#include <bitset>

View File

@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/Timer.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"

View File

@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
#include "WindowsSupport.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/Support/FileSystem.h"
#include <cstdio>
#include <fcntl.h>
@ -187,7 +186,7 @@ static bool Execute(ProcessInfo &PI, StringRef Program, const char **args,
}
// Now build the command line.
OwningArrayPtr<char> command(new char[len+1]);
std::unique_ptr<char[]> command(new char[len+1]);
char *p = command.get();
for (unsigned i = 0; args[i]; i++) {

View File

@ -1561,12 +1561,10 @@ bool Scanner::fetchMoreTokens() {
}
Stream::Stream(StringRef Input, SourceMgr &SM)
: scanner(new Scanner(Input, SM))
, CurrentDoc(0) {}
: scanner(new Scanner(Input, SM)), CurrentDoc() {}
Stream::Stream(MemoryBuffer *InputBuffer, SourceMgr &SM)
: scanner(new Scanner(InputBuffer, SM))
, CurrentDoc(0) {}
: scanner(new Scanner(InputBuffer, SM)), CurrentDoc() {}
Stream::~Stream() {}
@ -1601,11 +1599,9 @@ void Stream::skip() {
i->skip();
}
Node::Node(unsigned int Type, OwningPtr<Document> &D, StringRef A, StringRef T)
: Doc(D)
, TypeID(Type)
, Anchor(A)
, Tag(T) {
Node::Node(unsigned int Type, std::unique_ptr<Document> &D, StringRef A,
StringRef T)
: Doc(D), TypeID(Type), Anchor(A), Tag(T) {
SMLoc Start = SMLoc::getFromPointer(peekNext().Range.begin());
SourceRange = SMRange(Start, Start);
}

View File

@ -16,7 +16,6 @@
//===----------------------------------------------------------------------===//
#include "TGParser.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/ToolOutputFile.h"
@ -81,7 +80,7 @@ int TableGenMain(char *argv0, TableGenMainFn *MainFn) {
RecordKeeper Records;
// Parse the input file.
OwningPtr<MemoryBuffer> File;
std::unique_ptr<MemoryBuffer> File;
if (error_code ec =
MemoryBuffer::getFileOrSTDIN(InputFilename, File)) {
errs() << "Could not open input file '" << InputFilename << "': "

View File

@ -19,7 +19,6 @@
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
@ -349,7 +348,7 @@ struct AddressSanitizer : public FunctionPass {
Function *AsanHandleNoReturnFunc;
Function *AsanCovFunction;
Function *AsanPtrCmpFunction, *AsanPtrSubFunction;
OwningPtr<SpecialCaseList> BL;
std::unique_ptr<SpecialCaseList> BL;
// This array is indexed by AccessIsWrite and log2(AccessSize).
Function *AsanErrorCallback[2][kNumberOfAccessSizes];
// This array is indexed by AccessIsWrite.
@ -386,7 +385,7 @@ class AddressSanitizerModule : public ModulePass {
bool CheckInitOrder;
SmallString<64> BlacklistFile;
OwningPtr<SpecialCaseList> BL;
std::unique_ptr<SpecialCaseList> BL;
SetOfDynamicallyInitializedGlobals DynamicallyInitializedGlobals;
Type *IntptrTy;
LLVMContext *C;

View File

@ -190,7 +190,7 @@ class DataFlowSanitizer : public ModulePass {
Constant *DFSanSetLabelFn;
Constant *DFSanNonzeroLabelFn;
MDNode *ColdCallWeights;
OwningPtr<SpecialCaseList> ABIList;
std::unique_ptr<SpecialCaseList> ABIList;
DenseMap<Value *, Function *> UnwrappedFnMap;
AttributeSet ReadOnlyNoneAttrs;

View File

@ -503,7 +503,7 @@ bool DebugIR::updateExtension(StringRef NewExtension) {
return true;
}
void DebugIR::generateFilename(OwningPtr<int> &fd) {
void DebugIR::generateFilename(std::unique_ptr<int> &fd) {
SmallVector<char, 16> PathVec;
fd.reset(new int);
sys::fs::createTemporaryFile("debug-ir", "ll", *fd, PathVec);
@ -524,7 +524,7 @@ std::string DebugIR::getPath() {
}
void DebugIR::writeDebugBitcode(const Module *M, int *fd) {
OwningPtr<raw_fd_ostream> Out;
std::unique_ptr<raw_fd_ostream> Out;
std::string error;
if (!fd) {
@ -542,12 +542,12 @@ void DebugIR::writeDebugBitcode(const Module *M, int *fd) {
Out->close();
}
void DebugIR::createDebugInfo(Module &M, OwningPtr<Module> &DisplayM) {
void DebugIR::createDebugInfo(Module &M, std::unique_ptr<Module> &DisplayM) {
if (M.getFunctionList().size() == 0)
// no functions -- no debug info needed
return;
OwningPtr<ValueToValueMapTy> VMap;
std::unique_ptr<ValueToValueMapTy> VMap;
if (WriteSourceToDisk && (HideDebugIntrinsics || HideDebugMetadata)) {
VMap.reset(new ValueToValueMapTy);
@ -566,7 +566,7 @@ void DebugIR::createDebugInfo(Module &M, OwningPtr<Module> &DisplayM) {
bool DebugIR::isMissingPath() { return Filename.empty() || Directory.empty(); }
bool DebugIR::runOnModule(Module &M) {
OwningPtr<int> fd;
std::unique_ptr<int> fd;
if (isMissingPath() && !getSourceInfo(M)) {
if (!WriteSourceToDisk)
@ -585,7 +585,7 @@ bool DebugIR::runOnModule(Module &M) {
// file name from the DICompileUnit descriptor.
DebugMetadataRemover::process(M, !ParsedPath);
OwningPtr<Module> DisplayM;
std::unique_ptr<Module> DisplayM;
createDebugInfo(M, DisplayM);
if (WriteSourceToDisk) {
Module *OutputM = DisplayM.get() ? DisplayM.get() : &M;

View File

@ -16,7 +16,6 @@
#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_DEBUGIR_H
#define LLVM_TRANSFORMS_INSTRUMENTATION_DEBUGIR_H
#include "llvm/ADT/OwningPtr.h"
#include "llvm/Pass.h"
namespace llvm {
@ -79,11 +78,11 @@ private:
bool updateExtension(llvm::StringRef NewExtension);
/// Generate a temporary filename and open an fd
void generateFilename(llvm::OwningPtr<int> &fd);
void generateFilename(std::unique_ptr<int> &fd);
/// Creates DWARF CU/Subroutine metadata
void createDebugInfo(llvm::Module &M,
llvm::OwningPtr<llvm::Module> &DisplayM);
std::unique_ptr<llvm::Module> &DisplayM);
/// Returns true if either Directory or Filename is missing, false otherwise.
bool isMissingPath();

View File

@ -687,7 +687,7 @@ GlobalVariable *GCOVProfiler::buildEdgeLookupTable(
Type *Int64PtrTy = Type::getInt64PtrTy(*Ctx);
ArrayType *EdgeTableTy = ArrayType::get(Int64PtrTy, TableSize);
OwningArrayPtr<Constant *> EdgeTable(new Constant*[TableSize]);
std::unique_ptr<Constant * []> EdgeTable(new Constant *[TableSize]);
Constant *NullValue = Constant::getNullValue(Int64PtrTy);
for (size_t i = 0; i != TableSize; ++i)
EdgeTable[i] = NullValue;

View File

@ -272,7 +272,7 @@ class MemorySanitizer : public FunctionPass {
/// \brief Path to blacklist file.
SmallString<64> BlacklistFile;
/// \brief The blacklist.
OwningPtr<SpecialCaseList> BL;
std::unique_ptr<SpecialCaseList> BL;
/// \brief An empty volatile inline asm that prevents callback merge.
InlineAsm *EmptyAsm;
@ -489,7 +489,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
MemorySanitizer &MS;
SmallVector<PHINode *, 16> ShadowPHINodes, OriginPHINodes;
ValueMap<Value*, Value*> ShadowMap, OriginMap;
OwningPtr<VarArgHelper> VAHelper;
std::unique_ptr<VarArgHelper> VAHelper;
// The following flags disable parts of MSan instrumentation based on
// blacklist contents and command-line options.

View File

@ -99,7 +99,7 @@ struct ThreadSanitizer : public FunctionPass {
const DataLayout *DL;
Type *IntptrTy;
SmallString<64> BlacklistFile;
OwningPtr<SpecialCaseList> BL;
std::unique_ptr<SpecialCaseList> BL;
IntegerType *OrdTy;
// Callbacks to run-time library are computed in doInitialization.
Function *TsanFuncEntry;

View File

@ -26,7 +26,6 @@
#include "llvm/Transforms/Scalar.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringMap.h"
@ -240,7 +239,7 @@ public:
static char ID;
SampleProfileLoader(StringRef Name = SampleProfileFile)
: FunctionPass(ID), Profiler(0), Filename(Name) {
: FunctionPass(ID), Profiler(), Filename(Name) {
initializeSampleProfileLoaderPass(*PassRegistry::getPassRegistry());
}
@ -261,7 +260,7 @@ public:
protected:
/// \brief Profile reader object.
OwningPtr<SampleModuleProfile> Profiler;
std::unique_ptr<SampleModuleProfile> Profiler;
/// \brief Name of the profile file to load.
StringRef Filename;
@ -399,7 +398,7 @@ void SampleModuleProfile::dump() {
/// profiles for large programs, as the representation is extremely
/// inefficient.
void SampleModuleProfile::loadText() {
OwningPtr<MemoryBuffer> Buffer;
std::unique_ptr<MemoryBuffer> Buffer;
error_code EC = MemoryBuffer::getFile(Filename, Buffer);
if (EC)
report_fatal_error("Could not open file " + Filename + ": " + EC.message());

View File

@ -15,7 +15,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Transforms/Utils/SpecialCaseList.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
@ -55,7 +54,7 @@ SpecialCaseList *SpecialCaseList::create(
const StringRef Path, std::string &Error) {
if (Path.empty())
return new SpecialCaseList();
OwningPtr<MemoryBuffer> File;
std::unique_ptr<MemoryBuffer> File;
if (error_code EC = MemoryBuffer::getFile(Path, File)) {
Error = (Twine("Can't open file '") + Path + "': " + EC.message()).str();
return 0;
@ -65,7 +64,7 @@ SpecialCaseList *SpecialCaseList::create(
SpecialCaseList *SpecialCaseList::create(
const MemoryBuffer *MB, std::string &Error) {
OwningPtr<SpecialCaseList> SCL(new SpecialCaseList());
std::unique_ptr<SpecialCaseList> SCL(new SpecialCaseList());
if (!SCL->parse(MB, Error))
return 0;
return SCL.release();

View File

@ -122,7 +122,7 @@ bool BugDriver::addSources(const std::vector<std::string> &Filenames) {
outs() << "Read input file : '" << Filenames[0] << "'\n";
for (unsigned i = 1, e = Filenames.size(); i != e; ++i) {
OwningPtr<Module> M(ParseInputFile(Filenames[i], Context));
std::unique_ptr<Module> M(ParseInputFile(Filenames[i], Context));
if (M.get() == 0) return true;
outs() << "Linking in input file: '" << Filenames[i] << "'\n";

View File

@ -128,8 +128,8 @@ ReduceMiscompilingPasses::doTest(std::vector<std::string> &Prefix,
// Ok, so now we know that the prefix passes work, try running the suffix
// passes on the result of the prefix passes.
//
OwningPtr<Module> PrefixOutput(ParseInputFile(BitcodeResult,
BD.getContext()));
std::unique_ptr<Module> PrefixOutput(
ParseInputFile(BitcodeResult, BD.getContext()));
if (!PrefixOutput) {
errs() << BD.getToolName() << ": Error reading bitcode file '"
<< BitcodeResult << "'!\n";
@ -145,7 +145,8 @@ ReduceMiscompilingPasses::doTest(std::vector<std::string> &Prefix,
<< "' passes compile correctly after the '"
<< getPassesString(Prefix) << "' passes: ";
OwningPtr<Module> OriginalInput(BD.swapProgramIn(PrefixOutput.release()));
std::unique_ptr<Module> OriginalInput(
BD.swapProgramIn(PrefixOutput.release()));
if (BD.runPasses(BD.getProgram(), Suffix, BitcodeResult, false/*delete*/,
true/*quiet*/)) {
errs() << " Error running this sequence of passes"

View File

@ -14,7 +14,6 @@
#include "llvm/Config/config.h" // plugin-api.h requires HAVE_STDINT_H
#include "llvm-c/lto.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/Errno.h"
#include "llvm/Support/FileSystem.h"
@ -246,7 +245,7 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
int *claimed) {
lto_module_t M;
const void *view;
OwningPtr<MemoryBuffer> buffer;
std::unique_ptr<MemoryBuffer> buffer;
if (get_view) {
if (get_view(file->handle, &view) != LDPS_OK) {
(*message)(LDPL_ERROR, "Failed to get a view of %s", file->name);

View File

@ -206,7 +206,7 @@ int main(int argc, char **argv) {
static int compileModule(char **argv, LLVMContext &Context) {
// Load the module to be compiled...
SMDiagnostic Err;
OwningPtr<Module> M;
std::unique_ptr<Module> M;
Module *mod = 0;
Triple TheTriple;
@ -266,10 +266,9 @@ static int compileModule(char **argv, LLVMContext &Context) {
TargetOptions Options = InitTargetOptionsFromCodeGenFlags();
Options.DisableIntegratedAS = NoIntegratedAssembler;
OwningPtr<TargetMachine>
target(TheTarget->createTargetMachine(TheTriple.getTriple(),
MCPU, FeaturesStr, Options,
RelocModel, CMModel, OLvl));
std::unique_ptr<TargetMachine> target(
TheTarget->createTargetMachine(TheTriple.getTriple(), MCPU, FeaturesStr,
Options, RelocModel, CMModel, OLvl));
assert(target.get() && "Could not allocate target machine!");
assert(mod && "Should have exited after outputting help!");
TargetMachine &Target = *target.get();
@ -284,8 +283,8 @@ static int compileModule(char **argv, LLVMContext &Context) {
FloatABIForCalls = FloatABI::Soft;
// Figure out where we are going to send the output.
OwningPtr<tool_output_file> Out
(GetOutputStream(TheTarget->getName(), TheTriple.getOS(), argv[0]));
std::unique_ptr<tool_output_file> Out(
GetOutputStream(TheTarget->getName(), TheTriple.getOS(), argv[0]));
if (!Out) return 1;
// Build up all of the passes that we want to do to the module.

Some files were not shown because too many files have changed in this diff Show More