Support/PathV1: Deprecate get{Basename,Dirname,Suffix}.
[oota-llvm.git] / lib / CompilerDriver / CompilationGraph.cpp
index 87a2c4817a842487c8d260d2ac18ba7976c4a632..33c6566499b8777bd7084293115be9df8525a0f5 100644 (file)
@@ -32,7 +32,8 @@ using namespace llvmc;
 namespace llvmc {
 
   const std::string* LanguageMap::GetLanguage(const sys::Path& File) const {
-    StringRef suf = File.getSuffix();
+    // Remove the '.'.
+    StringRef suf = sys::path::extension(File.str()).substr(1);
     LanguageMap::const_iterator Lang =
       this->find(suf.empty() ? "*empty*" : suf);
     if (Lang == this->end()) {