diff --git a/test/FrontendC++/2010-04-30-OptimizedMethod-Dbg.cpp b/test/FrontendC++/2010-04-30-OptimizedMethod-Dbg.cpp deleted file mode 100644 index 761c0dc097a..00000000000 --- a/test/FrontendC++/2010-04-30-OptimizedMethod-Dbg.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// RUN: %llvmgcc -g -S -O2 %s -o - | FileCheck %s - -class foo { -public: - int bar(int x); - static int baz(int x); -}; - -int foo::bar(int x) { - // CHECK: {{i32 [0-9]+, i1 true(, i[0-9]+ [^\}]+[}]|[}]) ; \[ DW_TAG_subprogram \]}} - return x*4 + 1; -} - -int foo::baz(int x) { - // CHECK: {{i32 [0-9]+, i1 true(, i[0-9]+ [^\},]+[}]|[}]) ; \[ DW_TAG_subprogram \]}} - return x*4 + 1; -} - diff --git a/test/FrontendC++/2010-05-10-Var-DbgInfo.cpp b/test/FrontendC++/2010-05-10-Var-DbgInfo.cpp deleted file mode 100644 index e6165c0cce2..00000000000 --- a/test/FrontendC++/2010-05-10-Var-DbgInfo.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// RUN: %llvmgcc -S -O0 -g %s -o /dev/null -// PR 7104 - -struct A { - int Ai; -}; - -struct B : public A {}; -struct C : public B {}; - -const char * f(int C::*){ return ""; } -int f(int B::*) { return 1; } - -struct D : public C {}; - -const char * g(int B::*){ return ""; } -int g(int D::*) { return 1; } - -void test() -{ - int i = f(&A::Ai); - - const char * str = g(&A::Ai); -} - -// conversion of B::* to C::* is better than conversion of A::* to C::* -typedef void (A::*pmfa)(); -typedef void (B::*pmfb)(); -typedef void (C::*pmfc)(); - -struct X { - operator pmfa(); - operator pmfb(); -}; - - -void g(pmfc); - -void test2(X x) -{ - g(x); -} - diff --git a/test/FrontendC++/2010-05-11-alwaysinlineinstantiation.cpp b/test/FrontendC++/2010-05-11-alwaysinlineinstantiation.cpp deleted file mode 100644 index 9203dbd0bd9..00000000000 --- a/test/FrontendC++/2010-05-11-alwaysinlineinstantiation.cpp +++ /dev/null @@ -1,31 +0,0 @@ -// RUN: %llvmgxx -xc++ %s -S -o - | not grep ZN12basic_stringIcEC1Ev -// RUN: %llvmgxx -xc++ %s -S -o - | grep ZN12basic_stringIcED1Ev | count 2 - -template -class basic_string -{ -public: - basic_string(); - ~basic_string(); -}; - -template -__attribute__ ((__visibility__("hidden"), __always_inline__)) inline -basic_string::basic_string() -{ -} - -template -inline -basic_string::~basic_string() -{ -} - -typedef basic_string string; - -extern template class basic_string; - -int main() -{ - string s; -} diff --git a/test/FrontendC++/2010-05-12-PtrToMember-Dbg.cpp b/test/FrontendC++/2010-05-12-PtrToMember-Dbg.cpp deleted file mode 100644 index c2d6abe97fc..00000000000 --- a/test/FrontendC++/2010-05-12-PtrToMember-Dbg.cpp +++ /dev/null @@ -1,17 +0,0 @@ -//RUN: %llvmgxx -O0 -S -g -o - %s | grep DW_TAG_auto_variable -class Foo -{ - public: - int x; - int y; - Foo (int i, int j) { x = i; y = j; } -}; - - -Foo foo(10, 11); - -int main() { - int Foo::* pmi = &Foo::y; - return foo.*pmi; -} - diff --git a/test/FrontendC++/2010-06-21-LocalVarDbg.cpp b/test/FrontendC++/2010-06-21-LocalVarDbg.cpp deleted file mode 100644 index 48d821508dd..00000000000 --- a/test/FrontendC++/2010-06-21-LocalVarDbg.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// RUN: %llvmgxx -g -Os -S %s -o - | llvm-as -disable-output -// Do not use function name to create named metadata used to hold -// local variable info. For example. llvm.dbg.lv.~A is an invalid name. -class A { -public: - ~A() { int i = 0; i++; } -}; - -int foo(int i) { - A a; - return 0; -} - diff --git a/test/FrontendC++/2010-06-22-BitfieldInit.cpp b/test/FrontendC++/2010-06-22-BitfieldInit.cpp deleted file mode 100644 index 8dceb78bfc6..00000000000 --- a/test/FrontendC++/2010-06-22-BitfieldInit.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// RUN: %llvmgxx -g -S %s -struct TEST2 -{ - int subid:32; - int :0; -}; - -typedef struct _TEST3 -{ - TEST2 foo; - TEST2 foo2; -} TEST3; - -TEST3 test = - { - {0}, - {0} - }; - -int main() { return 0; } diff --git a/test/FrontendC++/2010-06-22-ZeroBitfield.cpp b/test/FrontendC++/2010-06-22-ZeroBitfield.cpp deleted file mode 100644 index 9c4f2629f74..00000000000 --- a/test/FrontendC++/2010-06-22-ZeroBitfield.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// RUN: %llvmgxx -g -S %s -struct s8_0 { unsigned : 0; }; -struct s8_1 { double x; }; -struct s8 { s8_0 a; s8_1 b; }; -s8 f8() { return s8(); } diff --git a/test/FrontendC++/2010-07-19-nowarn.cpp b/test/FrontendC++/2010-07-19-nowarn.cpp deleted file mode 100644 index a61a84ff28b..00000000000 --- a/test/FrontendC++/2010-07-19-nowarn.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// RUN: %llvmgcc %s -S -m32 -fasm-blocks -o /dev/null -// This should not warn about unreferenced label. 8195660. -// XFAIL: * -// XTARGET: x86,i386,i686 - -void quarterAsm(int array[], int len) -{ - __asm - { - mov esi, array; - mov ecx, len; - shr ecx, 2; -loop: - movdqa xmm0, [esi]; - psrad xmm0, 2; - movdqa [esi], xmm0; - add esi, 16; - sub ecx, 1; - jnz loop; - } -} diff --git a/test/FrontendC++/2010-07-23-DeclLoc.cpp b/test/FrontendC++/2010-07-23-DeclLoc.cpp deleted file mode 100644 index 9bf432beb72..00000000000 --- a/test/FrontendC++/2010-07-23-DeclLoc.cpp +++ /dev/null @@ -1,86 +0,0 @@ -// RUN: %llvmgxx -S -g %s -o - | FileCheck %s -// Require the template function declaration refer to the correct filename. -// First, locate the function decl in metadata, and pluck out the file handle: -// CHECK: {{extract_dwarf_data_from_header.*extract_dwarf_data_from_header.*extract_dwarf_data_from_header.*[^ ]+", metadata !}}[[filehandle:[0-9]+]], -// Second: Require that filehandle refer to the correct filename: -// CHECK: {{^!}}[[filehandle]] = metadata {{![{].*}} metadata !"decl_should_be_here.hpp", -typedef long unsigned int __darwin_size_t; -typedef __darwin_size_t size_t; -typedef unsigned char uint8_t; -typedef unsigned int uint32_t; -typedef unsigned long long uint64_t; -namespace std { - template class auto_ptr { - _Tp* _M_ptr; - public: - typedef _Tp element_type; - auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } - element_type& operator*() const throw() { } - }; -} -class Pointer32 { -public: - typedef uint32_t ptr_t; - typedef uint32_t size_t; -}; -class Pointer64 { -public: - typedef uint64_t ptr_t; - typedef uint64_t size_t; -}; -class BigEndian {}; -class LittleEndian {}; -template class SizeAndEndianness { -public: - typedef _SIZE SIZE; -}; -typedef SizeAndEndianness ISA32Little; -typedef SizeAndEndianness ISA32Big; -typedef SizeAndEndianness ISA64Little; -typedef SizeAndEndianness ISA64Big; -template class TRange { -protected: - typename SIZE::ptr_t _location; - typename SIZE::size_t _length; - TRange(typename SIZE::ptr_t location, typename SIZE::size_t length) : _location(location), _length(length) { } -}; -template class TRangeValue : public TRange { - T _value; -public: - TRangeValue(typename SIZE::ptr_t location, typename SIZE::size_t length, T value) : TRange(location, length), _value(value) {}; -}; -template class TAddressRelocator {}; -class CSCppSymbolOwner{}; -class CSCppSymbolOwnerData{}; -template class TRawSymbolOwnerData -{ - TRangeValue< SIZE, uint8_t* > _TEXT_text_section; - const char* _dsym_path; - uint32_t _dylib_current_version; - uint32_t _dylib_compatibility_version; -public: - TRawSymbolOwnerData() : - _TEXT_text_section(0, 0, __null), _dsym_path(__null), _dylib_current_version(0), _dylib_compatibility_version(0) {} -}; -template class TExtendedMachOHeader {}; -# 16 "decl_should_be_here.hpp" -template void extract_dwarf_data_from_header(TExtendedMachOHeader& header, - TRawSymbolOwnerData& symbol_owner_data, - TAddressRelocator* address_relocator) {} -struct CSCppSymbolOwnerHashFunctor { - size_t operator()(const CSCppSymbolOwner& symbol_owner) const { -# 97 "wrong_place_for_decl.cpp" - } -}; -template CSCppSymbolOwnerData* create_symbol_owner_data_arch_specific(CSCppSymbolOwner* symbol_owner, const char* dsym_path) { - typedef typename SIZE_AND_ENDIANNESS::SIZE SIZE; - std::auto_ptr< TRawSymbolOwnerData > data(new TRawSymbolOwnerData()); - std::auto_ptr< TExtendedMachOHeader > header; - extract_dwarf_data_from_header(*header, *data, (TAddressRelocator*)__null); -} -CSCppSymbolOwnerData* create_symbol_owner_data2(CSCppSymbolOwner* symbol_owner, const char* dsym_path) { - create_symbol_owner_data_arch_specific< ISA32Little >(symbol_owner, dsym_path); - create_symbol_owner_data_arch_specific< ISA32Big >(symbol_owner, dsym_path); - create_symbol_owner_data_arch_specific< ISA64Little >(symbol_owner, dsym_path); - create_symbol_owner_data_arch_specific< ISA64Big >(symbol_owner, dsym_path); -} diff --git a/test/FrontendC++/2010-08-31-ByValArg.cpp b/test/FrontendC++/2010-08-31-ByValArg.cpp deleted file mode 100644 index 4ccaabd7d0c..00000000000 --- a/test/FrontendC++/2010-08-31-ByValArg.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// This regression test checks byval arguments' debug info. -// Radar 8367011 -// RUN: %llvmgcc -S -O0 -g %s -o - | \ -// RUN: llc --disable-cfi --disable-fp-elim -o %t.s -O0 -relocation-model=pic -// RUN: %compile_c %t.s -o %t.o -// RUN: %link %t.o -o %t.exe -// RUN: echo {break get\nrun\np missing_arg.b} > %t.in -// RUN: gdb -q -batch -n -x %t.in %t.exe | tee %t.out | \ -// RUN: grep {1 = 4242} - -// XTARGET: x86_64-apple-darwin - -class EVT { -public: - int a; - int b; - int c; -}; - -class VAL { -public: - int x; - int y; -}; -void foo(EVT e); -EVT bar(); - -void get(int *i, unsigned dl, VAL v, VAL *p, unsigned n, EVT missing_arg) { -//CHECK: .ascii "missing_arg" - EVT e = bar(); - if (dl == n) - foo(missing_arg); -} - - -EVT bar() { - EVT e; - return e; -} - -void foo(EVT e) {} - -int main(){ - VAL v; - EVT ma; - ma.a = 1; - ma.b = 4242; - ma.c = 3; - int i = 42; - get (&i, 1, v, &v, 2, ma); - return 0; -} - diff --git a/test/FrontendC++/alignstack.cpp b/test/FrontendC++/alignstack.cpp deleted file mode 100644 index 4f993d669bf..00000000000 --- a/test/FrontendC++/alignstack.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// RUN: %llvmgxx %s -fasm-blocks -S -o - | FileCheck %s -// Complicated expression as jump target -// XFAIL: * -// XTARGET: x86,i386,i686,darwin - -void Method3() -{ -// CHECK: Method3 -// CHECK-NOT: alignstack - asm("foo:"); -// CHECK: return -} - -void Method4() -{ -// CHECK: Method4 -// CHECK: alignstack - asm { - bar: - } -// CHECK: return -} - diff --git a/test/FrontendC++/integration-O2.cpp b/test/FrontendC++/integration-O2.cpp deleted file mode 100644 index bb65ac21033..00000000000 --- a/test/FrontendC++/integration-O2.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// RUN: %llvmgxx %s -O2 -S -o - | FileCheck %s - -// This test verifies that we get expected codegen out of the -O2 optimization -// level from the full optimizer. - - - -// Verify that ipsccp is running and can eliminate globals. -static int test1g = 42; -void test1f1() { - if (test1g == 0) test1g = 0; -} -int test1f2() { - return test1g; -} - -// CHECK: @_Z7test1f2v() -// CHECK: entry: -// CHECK-NEXT: ret i32 42 diff --git a/test/FrontendC++/m64-ptr.cpp b/test/FrontendC++/m64-ptr.cpp deleted file mode 100644 index f91e2f4f858..00000000000 --- a/test/FrontendC++/m64-ptr.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// RUN: %llvmgxx %s -S -o - | FileCheck %s -// XFAIL: powerpc-apple-darwin - -// Make sure pointers are passed as pointers, not converted to int. -// The first load should be of type i8** in either 32 or 64 bit mode. -// This formerly happened on x86-64, 7375899. - -class StringRef { -public: - const char *Data; - long Len; -}; -void foo(StringRef X); -void bar(StringRef &A) { -// CHECK: @_Z3barR9StringRef -// CHECK: load i8** - foo(A); -// CHECK: ret void -} diff --git a/test/FrontendC++/member-alignment.cpp b/test/FrontendC++/member-alignment.cpp deleted file mode 100644 index c5b20b27932..00000000000 --- a/test/FrontendC++/member-alignment.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// RUN: %llvmgxx -S %s -o - | FileCheck %s -// XFAIL: arm,powerpc - -// rdar://7268289 - -class t { -public: - virtual void foo(void); - void bar(void); -}; - -void -t::bar(void) { -// CHECK: _ZN1t3barEv{{.*}} align 2 -} - -void -t::foo(void) { -// CHECK: _ZN1t3fooEv{{.*}} align 2 -} diff --git a/test/FrontendC++/ptr-to-method-devirt.cpp b/test/FrontendC++/ptr-to-method-devirt.cpp deleted file mode 100644 index 654df53fc1b..00000000000 --- a/test/FrontendC++/ptr-to-method-devirt.cpp +++ /dev/null @@ -1,15 +0,0 @@ -// PR1602 -// RUN: %llvmgxx -S %s -o - -O3 | not grep ptrtoint -// RUN: %llvmgxx -S %s -o - -O3 | not grep getelementptr -// RUN: %llvmgxx -S %s -o - -O3 | grep bitcast - - -struct S { virtual void f(); }; - -typedef void (S::*P)(void); - -const P p = &S::f; - -void g(S s) { - (s.*p)(); - } diff --git a/test/FrontendC++/thunk-linkonce-odr.cpp b/test/FrontendC++/thunk-linkonce-odr.cpp deleted file mode 100644 index ad72e64aa86..00000000000 --- a/test/FrontendC++/thunk-linkonce-odr.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// RUN: %llvmgxx %s -S -o - | FileCheck %s -// & - -struct A { - virtual int f() { return 1; } -}; - -struct B { - virtual int f() { return 2; } -}; - -struct C : A, B { - virtual int f() { return 3; } -}; - -struct D : C { - virtual int f() { return 4; } -}; - -static int f(D* d) { - B* b = d; - return b->f(); -}; - -int g() { - D d; - return f(&d); -} - -// Thunks should be marked as "linkonce ODR" not "weak". -// -// CHECK: define linkonce_odr i32 @_ZThn{{[48]}}_N1C1fEv -// CHECK: define linkonce_odr i32 @_ZThn{{[48]}}_N1D1fEv diff --git a/test/FrontendC++/varargs.cpp b/test/FrontendC++/varargs.cpp deleted file mode 100644 index c4de76acc30..00000000000 --- a/test/FrontendC++/varargs.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// RUN: %llvmgxx -S %s -o - | FileCheck %s -// rdar://7309675 -// PR4678 - -// test1 should be compmiled to be a varargs function in the IR even -// though there is no way to do a va_begin. Otherwise, the optimizer -// will warn about 'dropped arguments' at the call site. - -// CHECK: define i32 @_Z5test1z(...) -int test1(...) { - return -1; -} - -// CHECK: call i32 (...)* @_Z5test1z(i32 0) -void test() { - test1(0); -} - - diff --git a/test/FrontendC++/weak-external.cpp b/test/FrontendC++/weak-external.cpp deleted file mode 100644 index f4f0ba19ef3..00000000000 --- a/test/FrontendC++/weak-external.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// RUN: %llvmgxx %s -S -O2 -o - | not grep {_ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag} -// PR4262 - -// The "basic_string" extern template instantiation declaration is supposed to -// suppress the implicit instantiation of non-inline member functions. Make sure -// that we suppress the implicit instantiation of non-inline member functions -// defined out-of-line. That we aren't instantiating the basic_string -// constructor when we shouldn't be. Such an instantiation forces the implicit -// instantiation of _S_construct. Since _S_construct is a member -// template, it's instantiation is *not* suppressed (despite being in -// basic_string), so we would emit it as a weak definition. - -#include - -void dummysymbol() { - throw(std::runtime_error("string")); -} diff --git a/test/FrontendC++/x86-64-abi-sret-vs-2word-struct-param.cpp b/test/FrontendC++/x86-64-abi-sret-vs-2word-struct-param.cpp deleted file mode 100644 index f81854e0cb9..00000000000 --- a/test/FrontendC++/x86-64-abi-sret-vs-2word-struct-param.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// RUN: %llvmgxx -S %s -o - | grep byval | count 2 -// XTARGET: x86 -// PR4242 -// (PR 4242 bug is on 64-bit only, test passes on x86-32 as well) - -struct S { - void* data[3]; -}; - -struct T { - void* data[2]; -}; - -extern "C" S fail(int, int, int, int, T t, void* p) { - S s; - s.data[0] = t.data[0]; - s.data[1] = t.data[1]; - s.data[2] = p; - return s; -} - -extern "C" S* succeed(S* sret, int, int, int, int, T t, void* p) { - sret->data[0] = t.data[0]; - sret->data[1] = t.data[1]; - sret->data[2] = p; - return sret; -}