+++ /dev/null
-// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
-
-void foo();
-
-void bar() {
- struct local {
- ~local() { foo(); }
- } local_obj;
-
- foo();
-}
-
+++ /dev/null
-// 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()); }
+++ /dev/null
-// 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() {}
-}
+++ /dev/null
-// 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>();
-
-}
+++ /dev/null
-// 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>;
+++ /dev/null
-
-// 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());
-}
+++ /dev/null
-// 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;
+++ /dev/null
-// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
-
-struct duration {
- duration operator/=(int c) {
- return *this;
- }
-};
-
-void a000090() {
- duration() /= 1;
-}
+++ /dev/null
-// 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);
-}
-
+++ /dev/null
-// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
-
-class Empty {};
-
-void foo(Empty E);
-
-void bar() {
- foo(Empty());
-}
-
+++ /dev/null
-// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
-
-struct C {};
-
-C &foo();
-
-void foox() {
- for (; ; foo());
-}
-
+++ /dev/null
-// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
-
-// Test with an opaque type
-
-struct C;
-
-C &foo();
-
-void foox() {
- for (; ; foo());
-}
-
+++ /dev/null
-// 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();
-}
+++ /dev/null
-// 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;
-}
-
+++ /dev/null
-// 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();
-}
+++ /dev/null
-// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
-
-
-struct Foo {
- Foo(int);
- ~Foo();
-};
-void foo() {
- struct {
- Foo name;
- } Int[] = { 1 };
-}
+++ /dev/null
-// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
-
-#include <string>
-
-void bar();
-
-void test() {
- try {
- bar();
- } catch (std::string) {}
-}
+++ /dev/null
-// 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];
-}
+++ /dev/null
-// 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} }
-};
-