summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/JSONCompilationDatabase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Tooling/JSONCompilationDatabase.cpp')
-rw-r--r--clang/lib/Tooling/JSONCompilationDatabase.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Tooling/JSONCompilationDatabase.cpp b/clang/lib/Tooling/JSONCompilationDatabase.cpp
index dad4600798b..232c329de23 100644
--- a/clang/lib/Tooling/JSONCompilationDatabase.cpp
+++ b/clang/lib/Tooling/JSONCompilationDatabase.cpp
@@ -126,7 +126,7 @@ class JSONCompilationDatabasePlugin : public CompilationDatabasePlugin {
JSONCompilationDatabase::loadFromFile(JSONDatabasePath, ErrorMessage));
if (!Database)
return NULL;
- return Database.take();
+ return Database.release();
}
};
@@ -152,10 +152,10 @@ JSONCompilationDatabase::loadFromFile(StringRef FilePath,
return NULL;
}
OwningPtr<JSONCompilationDatabase> Database(
- new JSONCompilationDatabase(DatabaseBuffer.take()));
+ new JSONCompilationDatabase(DatabaseBuffer.release()));
if (!Database->parse(ErrorMessage))
return NULL;
- return Database.take();
+ return Database.release();
}
JSONCompilationDatabase *
@@ -164,10 +164,10 @@ JSONCompilationDatabase::loadFromBuffer(StringRef DatabaseString,
OwningPtr<llvm::MemoryBuffer> DatabaseBuffer(
llvm::MemoryBuffer::getMemBuffer(DatabaseString));
OwningPtr<JSONCompilationDatabase> Database(
- new JSONCompilationDatabase(DatabaseBuffer.take()));
+ new JSONCompilationDatabase(DatabaseBuffer.release()));
if (!Database->parse(ErrorMessage))
return NULL;
- return Database.take();
+ return Database.release();
}
std::vector<CompileCommand>
OpenPOWER on IntegriCloud