namespace llvmc {
const std::string& LanguageMap::GetLanguage(const sys::Path& File) const {
- LanguageMap::const_iterator Lang = this->find(File.getSuffix());
+ StringRef suf = File.getSuffix();
+ LanguageMap::const_iterator Lang = this->find(suf);
if (Lang == this->end())
- throw std::runtime_error(("Unknown suffix: " + File.getSuffix()).str());
+ throw std::runtime_error("File '" + File.str() +
+ "' has unknown suffix '" + suf.str() + '\'');
return Lang->second;
}
}
JoinTool* JT = &dynamic_cast<JoinTool&>(*CurNode->ToolPtr.getPtr());
// Are there any files in the join list?
- if (JT->JoinListEmpty())
+ if (JT->JoinListEmpty() && !(JT->WorksOnEmpty() && InputFilenames.empty()))
continue;
Action CurAction = JT->GenerateAction(CurNode->HasChildren(),