[llvm-commits] [llvm] r94544 - /llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp
Mikhail Glushenkov
foldr at codedgers.com
Tue Jan 26 06:55:16 PST 2010
Author: foldr
Date: Tue Jan 26 08:55:16 2010
New Revision: 94544
URL: http://llvm.org/viewvc/llvm-project?rev=94544&view=rev
Log:
Better error message.
Modified:
llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp
Modified: llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp?rev=94544&r1=94543&r2=94544&view=diff
==============================================================================
--- llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp (original)
+++ llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp Tue Jan 26 08:55:16 2010
@@ -33,9 +33,11 @@
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;
}
}
More information about the llvm-commits
mailing list