From c86b984ea8ecb3e944dc3de48539f4c1f65851ea Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 18 Jan 2015 16:23:48 +0000 Subject: 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 --- include/clang/Tooling/CompilationDatabase.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'include/clang/Tooling/CompilationDatabase.h') diff --git a/include/clang/Tooling/CompilationDatabase.h b/include/clang/Tooling/CompilationDatabase.h index d1e729a..27c1652 100644 --- a/include/clang/Tooling/CompilationDatabase.h +++ b/include/clang/Tooling/CompilationDatabase.h @@ -25,8 +25,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_TOOLING_COMPILATION_DATABASE_H -#define LLVM_CLANG_TOOLING_COMPILATION_DATABASE_H +#ifndef LLVM_CLANG_TOOLING_COMPILATIONDATABASE_H +#define LLVM_CLANG_TOOLING_COMPILATIONDATABASE_H #include "clang/Basic/LLVM.h" #include "llvm/ADT/ArrayRef.h" @@ -84,22 +84,22 @@ public: /// FIXME: Currently only supports JSON compilation databases, which /// are named 'compile_commands.json' in the given directory. Extend this /// for other build types (like ninja build files). - static CompilationDatabase *loadFromDirectory(StringRef BuildDirectory, - std::string &ErrorMessage); + static std::unique_ptr + loadFromDirectory(StringRef BuildDirectory, std::string &ErrorMessage); /// \brief Tries to detect a compilation database location and load it. /// /// Looks for a compilation database in all parent paths of file 'SourceFile' /// by calling loadFromDirectory. - static CompilationDatabase *autoDetectFromSource(StringRef SourceFile, - std::string &ErrorMessage); + static std::unique_ptr + autoDetectFromSource(StringRef SourceFile, std::string &ErrorMessage); /// \brief Tries to detect a compilation database location and load it. /// /// Looks for a compilation database in directory 'SourceDir' and all /// its parent paths by calling loadFromDirectory. - static CompilationDatabase *autoDetectFromDirectory(StringRef SourceDir, - std::string &ErrorMessage); + static std::unique_ptr + autoDetectFromDirectory(StringRef SourceDir, std::string &ErrorMessage); /// \brief Returns all compile commands in which the specified file was /// compiled. @@ -142,8 +142,8 @@ public: /// \brief Loads a compilation database from a build directory. /// /// \see CompilationDatabase::loadFromDirectory(). - virtual CompilationDatabase *loadFromDirectory(StringRef Directory, - std::string &ErrorMessage) = 0; + virtual std::unique_ptr + loadFromDirectory(StringRef Directory, std::string &ErrorMessage) = 0; }; /// \brief A compilation database that returns a single compile command line. @@ -213,4 +213,4 @@ private: } // end namespace tooling } // end namespace clang -#endif // LLVM_CLANG_TOOLING_COMPILATION_DATABASE_H +#endif -- cgit v1.1