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/CompilationDatabase.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/CompilationDatabase.h')
-rw-r--r-- | include/clang/Tooling/CompilationDatabase.h | 22 |
1 files changed, 11 insertions, 11 deletions
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<CompilationDatabase> + 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<CompilationDatabase> + 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<CompilationDatabase> + 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<CompilationDatabase> + 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 |