summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/modularize/Modularize.cpp
diff options
context:
space:
mode:
authorAhmed Charles <ahmedcharles@gmail.com>2014-03-09 09:24:40 +0000
committerAhmed Charles <ahmedcharles@gmail.com>2014-03-09 09:24:40 +0000
commit6a2dc5c3814916c57f23cbd0ca5375365a6f96c1 (patch)
tree385a19977c33443e7a1571834a41c02a93b03534 /clang-tools-extra/modularize/Modularize.cpp
parentb5669026872bf648cad824fbe6820a7dfeebc9e5 (diff)
downloadbcm5719-llvm-6a2dc5c3814916c57f23cbd0ca5375365a6f96c1.tar.gz
bcm5719-llvm-6a2dc5c3814916c57f23cbd0ca5375365a6f96c1.zip
[C++11] Replace OwningPtr with std::unique_ptr.
This removes all references to OwningPtr, which should be fairly undisruptive to out-of-tree projects since they are unlikely to use clang-tools-extra as a library instead of a set of tools. llvm-svn: 203382
Diffstat (limited to 'clang-tools-extra/modularize/Modularize.cpp')
-rw-r--r--clang-tools-extra/modularize/Modularize.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp
index 89d3d19ad62..1f93c5da546 100644
--- a/clang-tools-extra/modularize/Modularize.cpp
+++ b/clang-tools-extra/modularize/Modularize.cpp
@@ -154,7 +154,6 @@
#include "clang/Lex/Preprocessor.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "clang/Tooling/Tooling.h"
-#include "llvm/ADT/OwningPtr.h"
#include "llvm/Config/config.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
@@ -231,7 +230,7 @@ error_code getHeaderFileNames(SmallVectorImpl<std::string> &HeaderFileNames,
HeaderDirectory = HeaderPrefix;
// Read the header list file into a buffer.
- OwningPtr<MemoryBuffer> listBuffer;
+ std::unique_ptr<MemoryBuffer> listBuffer;
if (error_code ec = MemoryBuffer::getFile(ListFileName, listBuffer)) {
return ec;
}
@@ -290,7 +289,7 @@ error_code getHeaderFileNames(SmallVectorImpl<std::string> &HeaderFileNames,
// Helper function for finding the input file in an arguments list.
std::string findInputFile(const CommandLineArguments &CLArgs) {
- OwningPtr<OptTable> Opts(createDriverOptTable());
+ std::unique_ptr<OptTable> Opts(createDriverOptTable());
const unsigned IncludedFlagsBitmask = options::CC1Option;
unsigned MissingArgIndex, MissingArgCount;
SmallVector<const char *, 256> Argv;
@@ -298,7 +297,7 @@ std::string findInputFile(const CommandLineArguments &CLArgs) {
E = CLArgs.end();
I != E; ++I)
Argv.push_back(I->c_str());
- OwningPtr<InputArgList> Args(
+ std::unique_ptr<InputArgList> Args(
Opts->ParseArgs(Argv.data(), Argv.data() + Argv.size(), MissingArgIndex,
MissingArgCount, IncludedFlagsBitmask));
std::vector<std::string> Inputs = Args->getAllArgValues(OPT_INPUT);
@@ -725,12 +724,12 @@ int main(int Argc, const char **Argv) {
// Create the compilation database.
SmallString<256> PathBuf;
sys::fs::current_path(PathBuf);
- OwningPtr<CompilationDatabase> Compilations;
+ std::unique_ptr<CompilationDatabase> Compilations;
Compilations.reset(
new FixedCompilationDatabase(Twine(PathBuf), CC1Arguments));
// Create preprocessor tracker, to watch for macro and conditional problems.
- OwningPtr<PreprocessorTracker> PPTracker(PreprocessorTracker::create());
+ std::unique_ptr<PreprocessorTracker> PPTracker(PreprocessorTracker::create());
// Parse all of the headers, detecting duplicates.
EntityMap Entities;
OpenPOWER on IntegriCloud