diff options
Diffstat (limited to 'test/LLVMC/C++')
-rw-r--r-- | test/LLVMC/C++/dg.exp | 2 | ||||
-rw-r--r-- | test/LLVMC/C++/just-compile.cpp | 10 | ||||
-rw-r--r-- | test/LLVMC/C++/unknown_suffix.unk | 9 |
3 files changed, 20 insertions, 1 deletions
diff --git a/test/LLVMC/C++/dg.exp b/test/LLVMC/C++/dg.exp index fc852e30acf8f..209345540c11f 100644 --- a/test/LLVMC/C++/dg.exp +++ b/test/LLVMC/C++/dg.exp @@ -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}]] } diff --git a/test/LLVMC/C++/just-compile.cpp b/test/LLVMC/C++/just-compile.cpp new file mode 100644 index 0000000000000..771c9822da69e --- /dev/null +++ b/test/LLVMC/C++/just-compile.cpp @@ -0,0 +1,10 @@ +// Test that the -c flag works. +// RUN: llvmc -c %s -o %t.o +// RUN: llvmc --linker=c++ %t.o -o %t +// RUN: %abs_tmp | grep hello +// XFAIL: vg +#include <iostream> + +int main() { + std::cout << "hello" << '\n'; +} diff --git a/test/LLVMC/C++/unknown_suffix.unk b/test/LLVMC/C++/unknown_suffix.unk new file mode 100644 index 0000000000000..bf4aea2862473 --- /dev/null +++ b/test/LLVMC/C++/unknown_suffix.unk @@ -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'; +} |