diff options
author | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
commit | c86b984ea8ecb3e944dc3de48539f4c1f65851ea (patch) | |
tree | 3eb853da77d46cc77c4b017525a422f9ddb1385b /include/clang/Tooling/JSONCompilationDatabase.h | |
parent | c696171ff15f0ee60dea4abfd99a135473c95656 (diff) | |
download | FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.zip FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.tar.gz |
Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc1@226102
Diffstat (limited to 'include/clang/Tooling/JSONCompilationDatabase.h')
-rw-r--r-- | include/clang/Tooling/JSONCompilationDatabase.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/include/clang/Tooling/JSONCompilationDatabase.h b/include/clang/Tooling/JSONCompilationDatabase.h index 1b33359..b4edc31 100644 --- a/include/clang/Tooling/JSONCompilationDatabase.h +++ b/include/clang/Tooling/JSONCompilationDatabase.h @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_TOOLING_JSON_COMPILATION_DATABASE_H -#define LLVM_CLANG_TOOLING_JSON_COMPILATION_DATABASE_H +#ifndef LLVM_CLANG_TOOLING_JSONCOMPILATIONDATABASE_H +#define LLVM_CLANG_TOOLING_JSONCOMPILATIONDATABASE_H #include "clang/Basic/LLVM.h" #include "clang/Tooling/CompilationDatabase.h" @@ -53,14 +53,14 @@ public: /// /// Returns NULL and sets ErrorMessage if the database could not be /// loaded from the given file. - static JSONCompilationDatabase *loadFromFile(StringRef FilePath, - std::string &ErrorMessage); + static std::unique_ptr<JSONCompilationDatabase> + loadFromFile(StringRef FilePath, std::string &ErrorMessage); /// \brief Loads a JSON compilation database from a data buffer. /// /// Returns NULL and sets ErrorMessage if the database could not be loaded. - static JSONCompilationDatabase *loadFromBuffer(StringRef DatabaseString, - std::string &ErrorMessage); + static std::unique_ptr<JSONCompilationDatabase> + loadFromBuffer(StringRef DatabaseString, std::string &ErrorMessage); /// \brief Returns all compile comamnds in which the specified file was /// compiled. @@ -81,8 +81,9 @@ public: private: /// \brief Constructs a JSON compilation database on a memory buffer. - JSONCompilationDatabase(llvm::MemoryBuffer *Database) - : Database(Database), YAMLStream(Database->getBuffer(), SM) {} + JSONCompilationDatabase(std::unique_ptr<llvm::MemoryBuffer> Database) + : Database(std::move(Database)), + YAMLStream(this->Database->getBuffer(), SM) {} /// \brief Parses the database file and creates the index. /// @@ -112,4 +113,4 @@ private: } // end namespace tooling } // end namespace clang -#endif // LLVM_CLANG_TOOLING_JSON_COMPILATION_DATABASE_H +#endif |