diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2010-01-26 14:55:16 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2010-01-26 14:55:16 +0000 |
commit | 21e099a779e12a06bdc51267cb33c59cc85e15ff (patch) | |
tree | 65781d0830ba4e69f0d1a9098aac4468f943ed7c /lib/CompilerDriver | |
parent | ae779383bec1fd571dfd296ce56bc4cd1d8c8138 (diff) | |
download | external_llvm-21e099a779e12a06bdc51267cb33c59cc85e15ff.zip external_llvm-21e099a779e12a06bdc51267cb33c59cc85e15ff.tar.gz external_llvm-21e099a779e12a06bdc51267cb33c59cc85e15ff.tar.bz2 |
Better error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94544 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CompilerDriver')
-rw-r--r-- | lib/CompilerDriver/CompilationGraph.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CompilerDriver/CompilationGraph.cpp b/lib/CompilerDriver/CompilationGraph.cpp index 56e5b9c..524607b 100644 --- a/lib/CompilerDriver/CompilationGraph.cpp +++ b/lib/CompilerDriver/CompilationGraph.cpp @@ -33,9 +33,11 @@ using namespace llvmc; 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; } } |