diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2010-09-15 15:20:41 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2010-09-15 15:20:41 +0000 |
commit | 0c99d122081ae325c0fd4d4bbe138d2a6a9e6a14 (patch) | |
tree | d9f42c7f60d47ac3263c0d9d8f7c17e93e614d41 /llvm/lib/CompilerDriver/CompilationGraph.cpp | |
parent | 7617c7d2951f4cffb2de4dd4addbbf8884b6a2aa (diff) | |
download | llvm-0c99d122081ae325c0fd4d4bbe138d2a6a9e6a14.zip llvm-0c99d122081ae325c0fd4d4bbe138d2a6a9e6a14.tar.gz llvm-0c99d122081ae325c0fd4d4bbe138d2a6a9e6a14.tar.bz2 |
llvmc: make -x work with unknown suffixes.
llvm-svn: 113972
Diffstat (limited to 'llvm/lib/CompilerDriver/CompilationGraph.cpp')
-rw-r--r-- | llvm/lib/CompilerDriver/CompilationGraph.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CompilerDriver/CompilationGraph.cpp b/llvm/lib/CompilerDriver/CompilationGraph.cpp index d0c0e15..0aecfa6 100644 --- a/llvm/lib/CompilerDriver/CompilationGraph.cpp +++ b/llvm/lib/CompilerDriver/CompilationGraph.cpp @@ -218,10 +218,11 @@ FindToolChain(const sys::Path& In, const std::string* ForceLanguage, InputLanguagesSet& InLangs, const LanguageMap& LangMap) const { // Determine the input language. - const std::string* InLang = LangMap.GetLanguage(In); + const std::string* InLang = (ForceLanguage ? ForceLanguage + : LangMap.GetLanguage(In)); if (InLang == 0) return 0; - const std::string& InLanguage = (ForceLanguage ? *ForceLanguage : *InLang); + const std::string& InLanguage = *InLang; // Add the current input language to the input language set. InLangs.insert(InLanguage); |