mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-13 17:06:15 +00:00
remove a small scattering of basically pointless tests. These are
all covered by llvm-test, which is what they were reduced from back in 2003. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125189 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
71f4391b2e
commit
f18ed3853a
@ -1,12 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
void foo();
|
|
||||||
|
|
||||||
void bar() {
|
|
||||||
struct local {
|
|
||||||
~local() { foo(); }
|
|
||||||
} local_obj;
|
|
||||||
|
|
||||||
foo();
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
// This tests compilation of EMPTY_CLASS_EXPR's
|
|
||||||
|
|
||||||
struct empty {};
|
|
||||||
|
|
||||||
void foo(empty) {}
|
|
||||||
|
|
||||||
void bar() { foo(empty()); }
|
|
@ -1,16 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
|
|
||||||
namespace foo {
|
|
||||||
namespace bar {
|
|
||||||
struct X { X(); };
|
|
||||||
|
|
||||||
X::X() {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
struct Y { Y(); };
|
|
||||||
Y::Y() {}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
// Default placement versions of operator new.
|
|
||||||
#include <new>
|
|
||||||
|
|
||||||
void* operator new(size_t, void* __p) throw();
|
|
||||||
|
|
||||||
|
|
||||||
template<typename _CharT>
|
|
||||||
struct stdio_filebuf
|
|
||||||
{ stdio_filebuf();
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
extern stdio_filebuf<char> buf_cout;
|
|
||||||
|
|
||||||
void foo() {
|
|
||||||
// Create stream buffers for the standard streams and use
|
|
||||||
// those buffers without destroying and recreating the
|
|
||||||
// streams.
|
|
||||||
new (&buf_cout) stdio_filebuf<char>();
|
|
||||||
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
|
|
||||||
char* eback();
|
|
||||||
|
|
||||||
template<typename foo>
|
|
||||||
struct basic_filebuf {
|
|
||||||
char *instancevar;
|
|
||||||
|
|
||||||
void callee() {
|
|
||||||
instancevar += eback() != eback();
|
|
||||||
}
|
|
||||||
|
|
||||||
void caller();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
template<typename _CharT>
|
|
||||||
void basic_filebuf<_CharT>::caller() {
|
|
||||||
callee();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template class basic_filebuf<char>;
|
|
@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
// RUN: %llvmgcc -xc++ -S -o /dev/null %s |& not grep WARNING
|
|
||||||
|
|
||||||
struct iterator {
|
|
||||||
iterator();
|
|
||||||
iterator(const iterator &I);
|
|
||||||
};
|
|
||||||
|
|
||||||
iterator foo(const iterator &I) { return I; }
|
|
||||||
|
|
||||||
void test() {
|
|
||||||
foo(iterator());
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
// There is a HOLE in the derived2 object due to not wanting to place the two
|
|
||||||
// baseclass instances at the same offset!
|
|
||||||
|
|
||||||
struct baseclass {};
|
|
||||||
|
|
||||||
class derived1 : public baseclass {
|
|
||||||
void * NodePtr;
|
|
||||||
};
|
|
||||||
|
|
||||||
class derived2 : public baseclass {
|
|
||||||
derived1 current;
|
|
||||||
};
|
|
||||||
|
|
||||||
derived2 RI;
|
|
@ -1,11 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
struct duration {
|
|
||||||
duration operator/=(int c) {
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void a000090() {
|
|
||||||
duration() /= 1;
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
// Non-POD classes cannot be passed into a function by component, because their
|
|
||||||
// dtors must be run. Instead, pass them in by reference. The C++ front-end
|
|
||||||
// was mistakenly "thinking" that 'foo' took a structure by component.
|
|
||||||
|
|
||||||
struct C {
|
|
||||||
int A, B;
|
|
||||||
~C() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
void foo(C b);
|
|
||||||
|
|
||||||
void test(C *P) {
|
|
||||||
foo(*P);
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
class Empty {};
|
|
||||||
|
|
||||||
void foo(Empty E);
|
|
||||||
|
|
||||||
void bar() {
|
|
||||||
foo(Empty());
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
struct C {};
|
|
||||||
|
|
||||||
C &foo();
|
|
||||||
|
|
||||||
void foox() {
|
|
||||||
for (; ; foo());
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
// Test with an opaque type
|
|
||||||
|
|
||||||
struct C;
|
|
||||||
|
|
||||||
C &foo();
|
|
||||||
|
|
||||||
void foox() {
|
|
||||||
for (; ; foo());
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
// The C++ front-end thinks the two foo's are different, the LLVM emitter
|
|
||||||
// thinks they are the same. The disconnect causes problems.
|
|
||||||
|
|
||||||
void foo() { }
|
|
||||||
|
|
||||||
void bar() {
|
|
||||||
void foo();
|
|
||||||
|
|
||||||
foo();
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
struct test {
|
|
||||||
bool A : 1;
|
|
||||||
bool B : 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
void foo(test *T) {
|
|
||||||
T->B = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
struct super {
|
|
||||||
int Y;
|
|
||||||
void foo();
|
|
||||||
};
|
|
||||||
|
|
||||||
template <class T>
|
|
||||||
struct test : virtual super<int> {};
|
|
||||||
|
|
||||||
extern test<int> X;
|
|
||||||
|
|
||||||
void foo() {
|
|
||||||
X.foo();
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
|
|
||||||
struct Foo {
|
|
||||||
Foo(int);
|
|
||||||
~Foo();
|
|
||||||
};
|
|
||||||
void foo() {
|
|
||||||
struct {
|
|
||||||
Foo name;
|
|
||||||
} Int[] = { 1 };
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
void bar();
|
|
||||||
|
|
||||||
void test() {
|
|
||||||
try {
|
|
||||||
bar();
|
|
||||||
} catch (std::string) {}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
// RUN: %llvmgxx -xc++ %s -S -o - | grep getelementptr
|
|
||||||
|
|
||||||
struct foo {
|
|
||||||
int array[100];
|
|
||||||
void *getAddr(unsigned i);
|
|
||||||
};
|
|
||||||
|
|
||||||
void *foo::getAddr(unsigned i) {
|
|
||||||
return &array[i];
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
|
|
||||||
|
|
||||||
enum TchkType {
|
|
||||||
tchkNum, tchkString, tchkSCN, tchkNone
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Operator {
|
|
||||||
enum TchkType tchk[8];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Operator opTab[] = {
|
|
||||||
{{tchkNum, tchkNum, tchkString} }
|
|
||||||
};
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user