summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/attr.cpp
blob: 695e9e72f1a1cf3f1cb84681f6d44524a4147d19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// RUN: clang-cc -triple x86_64-apple-darwin -O0 -S %s -o %t.s
// RUN: FileCheck --input-file=%t.s %s

int foo() __attribute__((aligned(1024)));
int foo() { }

// CHECK:.align 10, 0x90
// CHECK:.globl __Z3foov
// CHECK:__Z3foov:


class C {
  virtual void bar1() __attribute__((aligned(1)));
  virtual void bar2() __attribute__((aligned(2)));
  virtual void bar3() __attribute__((aligned(1024)));
} c;

void C::bar1() { }

// CHECK:.align 1, 0x90
// CHECK-NEXT:.globl __ZN1C4bar1Ev
// CHECK-NEXT:__ZN1C4bar1Ev:


void C::bar2() { }

// CHECK:.align 1, 0x90
// CHECK-NEXT:.globl __ZN1C4bar2Ev
// CHECK-NEXT:__ZN1C4bar2Ev:


void C::bar3() { }

// CHECK:.align 10, 0x90
// CHECK-NEXT:.globl __ZN1C4bar3Ev
// CHECK-NEXT:__ZN1C4bar3Ev: