summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/attr.cpp
blob: 4c781c62b29f8e2040bd70f95c56c9d5d997833f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s

// CHECK: define i32 @_Z3foov() nounwind align 1024
int foo() __attribute__((aligned(1024)));
int foo() { }

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

// CHECK: define void @_ZN1C4bar1Ev(%class.C* %this) nounwind align 2
void C::bar1() { }

// CHECK: define void @_ZN1C4bar2Ev(%class.C* %this) nounwind align 2
void C::bar2() { }

// CHECK: define void @_ZN1C4bar3Ev(%class.C* %this) nounwind align 1024
void C::bar3() { }
OpenPOWER on IntegriCloud