diff options
Diffstat (limited to 'lib/Tooling/CompilationDatabase.cpp')
-rw-r--r-- | lib/Tooling/CompilationDatabase.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Tooling/CompilationDatabase.cpp b/lib/Tooling/CompilationDatabase.cpp index 4149cda3787c..b5b99cb7c63e 100644 --- a/lib/Tooling/CompilationDatabase.cpp +++ b/lib/Tooling/CompilationDatabase.cpp @@ -12,13 +12,13 @@ // //===----------------------------------------------------------------------===// -#include <sstream> #include "clang/Tooling/CompilationDatabase.h" #include "clang/Tooling/CompilationDatabasePluginRegistry.h" #include "clang/Tooling/Tooling.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/Path.h" #include "llvm/Support/system_error.h" +#include <sstream> namespace clang { namespace tooling { @@ -72,7 +72,7 @@ findCompilationDatabaseFromDirectory(StringRef Directory, CompilationDatabase * CompilationDatabase::autoDetectFromSource(StringRef SourceFile, std::string &ErrorMessage) { - llvm::SmallString<1024> AbsolutePath(getAbsolutePath(SourceFile)); + SmallString<1024> AbsolutePath(getAbsolutePath(SourceFile)); StringRef Directory = llvm::sys::path::parent_path(AbsolutePath); CompilationDatabase *DB = findCompilationDatabaseFromDirectory(Directory, @@ -87,7 +87,7 @@ CompilationDatabase::autoDetectFromSource(StringRef SourceFile, CompilationDatabase * CompilationDatabase::autoDetectFromDirectory(StringRef SourceDir, std::string &ErrorMessage) { - llvm::SmallString<1024> AbsolutePath(getAbsolutePath(SourceDir)); + SmallString<1024> AbsolutePath(getAbsolutePath(SourceDir)); CompilationDatabase *DB = findCompilationDatabaseFromDirectory(AbsolutePath, ErrorMessage); @@ -132,6 +132,11 @@ FixedCompilationDatabase::getAllFiles() const { return std::vector<std::string>(); } +std::vector<CompileCommand> +FixedCompilationDatabase::getAllCompileCommands() const { + return std::vector<CompileCommand>(); +} + // This anchor is used to force the linker to link in the generated object file // and thus register the JSONCompilationDatabasePlugin. extern volatile int JSONAnchorSource; |