summaryrefslogtreecommitdiffstats
path: root/include/clang/Tooling/CompilationDatabase.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Tooling/CompilationDatabase.h')
-rw-r--r--include/clang/Tooling/CompilationDatabase.h22
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
OpenPOWER on IntegriCloud