mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
llvmc: make -x work with unknown suffixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113972 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
161b4c46a3
commit
e6334d84f7
@ -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);
|
||||
|
@ -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}]]
|
||||
}
|
||||
|
9
test/LLVMC/C++/unknown_suffix.unk
Normal file
9
test/LLVMC/C++/unknown_suffix.unk
Normal file
@ -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';
|
||||
}
|
Loading…
Reference in New Issue
Block a user