From cf68f26bebc668382cc46faae7e7877fd4918b0e Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Tue, 23 Feb 2010 09:05:21 +0000 Subject: Input files with empty suffixes must be passed to linker. llvm-svn: 96927 --- llvm/lib/CompilerDriver/CompilationGraph.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CompilerDriver/CompilationGraph.cpp') diff --git a/llvm/lib/CompilerDriver/CompilationGraph.cpp b/llvm/lib/CompilerDriver/CompilationGraph.cpp index a36d3fb..7d1c7fe 100644 --- a/llvm/lib/CompilerDriver/CompilationGraph.cpp +++ b/llvm/lib/CompilerDriver/CompilationGraph.cpp @@ -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() + '\''); -- cgit v1.1