[llvm-commits] [llvm] r113972 - in /llvm/trunk: lib/CompilerDriver/CompilationGraph.cpp test/LLVMC/C++/dg.exp test/LLVMC/C++/unknown_suffix.unk
Mikhail Glushenkov
foldr at codedgers.com
Wed Sep 15 08:20:41 PDT 2010
Author: foldr
Date: Wed Sep 15 10:20:41 2010
New Revision: 113972
URL: http://llvm.org/viewvc/llvm-project?rev=113972&view=rev
Log:
llvmc: make -x work with unknown suffixes.
Added:
llvm/trunk/test/LLVMC/C++/unknown_suffix.unk
Modified:
llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp
llvm/trunk/test/LLVMC/C++/dg.exp
Modified: llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp?rev=113972&r1=113971&r2=113972&view=diff
==============================================================================
--- llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp (original)
+++ llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp Wed Sep 15 10:20:41 2010
@@ -218,10 +218,11 @@
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);
Modified: llvm/trunk/test/LLVMC/C++/dg.exp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/C%2B%2B/dg.exp?rev=113972&r1=113971&r2=113972&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/C++/dg.exp (original)
+++ llvm/trunk/test/LLVMC/C++/dg.exp Wed Sep 15 10:20:41 2010
@@ -1,5 +1,5 @@
load_lib llvm.exp
if [ llvm_gcc_supports c++ ] then {
- RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{unk,ll,c,cpp}]]
}
Added: llvm/trunk/test/LLVMC/C++/unknown_suffix.unk
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/C%2B%2B/unknown_suffix.unk?rev=113972&view=auto
==============================================================================
--- llvm/trunk/test/LLVMC/C++/unknown_suffix.unk (added)
+++ llvm/trunk/test/LLVMC/C++/unknown_suffix.unk Wed Sep 15 10:20:41 2010
@@ -0,0 +1,9 @@
+// Test that the -x option works for files with unknown suffixes.
+// RUN: llvmc -x c++ %s -o %t
+// RUN: %abs_tmp | grep hello
+// XFAIL: vg
+#include <iostream>
+
+int main() {
+ std::cout << "hello" << '\n';
+}
More information about the llvm-commits
mailing list