Input files with empty suffixes must be passed to linker.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96927 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mikhail Glushenkov
2010-02-23 09:05:21 +00:00
parent 130bedecee
commit 9660c5d3e0
2 changed files with 3 additions and 2 deletions

View File

@ -34,7 +34,8 @@ namespace llvmc {
const std::string& LanguageMap::GetLanguage(const sys::Path& File) const {
StringRef suf = File.getSuffix();
LanguageMap::const_iterator Lang = this->find(suf);
LanguageMap::const_iterator Lang =
this->find(suf.empty() ? "*empty*" : suf);
if (Lang == this->end())
throw std::runtime_error("File '" + File.str() +
"' has unknown suffix '" + suf.str() + '\'');