From e6334d84f7e45ff150475d9881d7be592fa326da Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Wed, 15 Sep 2010 15:20:41 +0000 Subject: llvmc: make -x work with unknown suffixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113972 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CompilerDriver/CompilationGraph.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/CompilerDriver/CompilationGraph.cpp') diff --git a/lib/CompilerDriver/CompilationGraph.cpp b/lib/CompilerDriver/CompilationGraph.cpp index d0c0e15bcd..0aecfa6a9d 100644 --- a/lib/CompilerDriver/CompilationGraph.cpp +++ b/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); -- cgit v1.2.3-18-g5258