summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CompilerDriver/CompilationGraph.cpp
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2010-01-26 14:55:16 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2010-01-26 14:55:16 +0000
commitd115cb60fec1642e8f883822eb8ce04866aabb6c (patch)
tree07d20407ef034cdd1cae857ae86c04a3c6c9ab6b /llvm/lib/CompilerDriver/CompilationGraph.cpp
parent81068d0a3d74a5a3ec80cd1f7ec65109ee68607f (diff)
downloadbcm5719-llvm-d115cb60fec1642e8f883822eb8ce04866aabb6c.tar.gz
bcm5719-llvm-d115cb60fec1642e8f883822eb8ce04866aabb6c.zip
Better error message.
llvm-svn: 94544
Diffstat (limited to 'llvm/lib/CompilerDriver/CompilationGraph.cpp')
-rw-r--r--llvm/lib/CompilerDriver/CompilationGraph.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CompilerDriver/CompilationGraph.cpp b/llvm/lib/CompilerDriver/CompilationGraph.cpp
index 56e5b9ce076..524607bee77 100644
--- a/llvm/lib/CompilerDriver/CompilationGraph.cpp
+++ b/llvm/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;
}
}
OpenPOWER on IntegriCloud