diff options
author | Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> | 2013-01-12 18:37:52 +0000 |
---|---|---|
committer | Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> | 2013-01-12 18:37:52 +0000 |
commit | 9cd506b7c983829a33ae7ac1297228d146c58a69 (patch) | |
tree | ce59089038bd2b9df846654037183aa632ff0386 /lib/Tooling/JSONCompilationDatabase.cpp | |
parent | 9946fc735d7285f2195f89635370f534afd9877e (diff) |
Fix spurious output in JSONCompilationDatabase
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172321 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Tooling/JSONCompilationDatabase.cpp')
-rw-r--r-- | lib/Tooling/JSONCompilationDatabase.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Tooling/JSONCompilationDatabase.cpp b/lib/Tooling/JSONCompilationDatabase.cpp index 25284cf11f..197b7e76f0 100644 --- a/lib/Tooling/JSONCompilationDatabase.cpp +++ b/lib/Tooling/JSONCompilationDatabase.cpp @@ -167,12 +167,8 @@ JSONCompilationDatabase::getCompileCommands(StringRef FilePath) const { std::string Error; llvm::raw_string_ostream ES(Error); StringRef Match = MatchTrie.findEquivalent(NativeFilePath.str(), ES); - if (Match.empty()) { - if (Error.empty()) - Error = "No match found."; - llvm::outs() << Error << "\n"; + if (Match.empty()) return std::vector<CompileCommand>(); - } llvm::StringMap< std::vector<CompileCommandRef> >::const_iterator CommandsRefI = IndexByFile.find(Match); if (CommandsRefI == IndexByFile.end()) |