Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / constructor-template.cpp
blob130a4f815d9efee1707ad6991d34666d068fc365
1 // REQUIRES: x86-registered-target
2 // RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
3 // RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
4 // RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -S %s -o %t-32.s
5 // RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s
7 // PR4826
8 struct A {
9 A() {
13 template<typename T>
14 struct B {
15 B(T) {}
17 A nodes;
21 // PR4853
22 template <typename T> class List {
23 public:
24 List(){ } // List<BinomialNodeptr>::List() remains undefined.
25 ~List() {}
28 template <typename T> class Node {
29 int i;
30 public:
31 Node(){ } // Node<BinomialNodeptr>::Node() remains undefined.
32 ~Node() {}
36 template<typename T> class BinomialNode : Node<BinomialNode<T>*> {
37 public:
38 BinomialNode(T value) {}
39 List<BinomialNode<T>*> nodes;
42 int main() {
43 B<int> *n = new B<int>(4);
44 BinomialNode<int> *node = new BinomialNode<int>(1);
45 delete node;
48 // CHECK-LP64: __ZN4ListIP12BinomialNodeIiEED1Ev:
49 // CHECK-LP64: __ZN4NodeIP12BinomialNodeIiEEC2Ev:
50 // CHECK-LP64: __ZN4ListIP12BinomialNodeIiEEC1Ev:
52 // CHECK-LP32: __ZN4ListIP12BinomialNodeIiEED1Ev:
53 // CHECK-LP32: __ZN4NodeIP12BinomialNodeIiEEC2Ev:
54 // CHECK-LP32: __ZN4ListIP12BinomialNodeIiEEC1Ev: