Fix spurious output in JSONCompilationDatabase

llvm-svn: 172321
This commit is contained in:
Arnaud A. de Grandmaison 2013-01-12 18:37:52 +00:00
parent 1737bd3a92
commit 3128a11ee8
1 changed files with 1 additions and 5 deletions

View File

@ -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())