summaryrefslogtreecommitdiffstats
path: root/lib/Tooling/CompilationDatabase.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-04-08 18:45:10 +0000
committerdim <dim@FreeBSD.org>2013-04-08 18:45:10 +0000
commitc72c57c9e9b69944e3e009cd5e209634839581d3 (patch)
tree4fc2f184c499d106f29a386c452b49e5197bf63d /lib/Tooling/CompilationDatabase.cpp
parent5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff)
downloadFreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip
FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'lib/Tooling/CompilationDatabase.cpp')
-rw-r--r--lib/Tooling/CompilationDatabase.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Tooling/CompilationDatabase.cpp b/lib/Tooling/CompilationDatabase.cpp
index 4149cda..b5b99cb 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;
OpenPOWER on IntegriCloud