Make Path use StringRef instead of std::string where possible.
[oota-llvm.git] / lib / CompilerDriver / CompilationGraph.cpp
index 3e6e050d6862874af63cfc6ce754a3a31109a0e6..56e5b9ce076161d04d10ff97fb910b1b5b194dcc 100644 (file)
@@ -35,7 +35,7 @@ namespace llvmc {
   const std::string& LanguageMap::GetLanguage(const sys::Path& File) const {
     LanguageMap::const_iterator Lang = this->find(File.getSuffix());
     if (Lang == this->end())
-      throw std::runtime_error("Unknown suffix: " + File.getSuffix());
+      throw std::runtime_error(("Unknown suffix: " + File.getSuffix()).str());
     return Lang->second;
   }
 }