From 9cd506b7c983829a33ae7ac1297228d146c58a69 Mon Sep 17 00:00:00 2001 From: "Arnaud A. de Grandmaison" Date: Sat, 12 Jan 2013 18:37:52 +0000 Subject: Fix spurious output in JSONCompilationDatabase git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172321 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Tooling/JSONCompilationDatabase.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/Tooling/JSONCompilationDatabase.cpp') 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(); - } llvm::StringMap< std::vector >::const_iterator CommandsRefI = IndexByFile.find(Match); if (CommandsRefI == IndexByFile.end()) -- cgit v1.2.1