blob: d689a4fdf493e32d15081ad84b56eebaad6b8062 [file] [log] [blame]
Anders Carlsson577cacc2010-01-27 02:49:52 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
Mike Stump4c83f7c2009-10-05 22:24:47 +00002
John McCallf746aa62010-03-19 23:29:14 +00003// CHECK: @test2 = alias i32 ()* @_Z5test1v
4
Anders Carlsson577cacc2010-01-27 02:49:52 +00005// CHECK: define i32 @_Z3foov() nounwind align 1024
Mike Stump4c83f7c2009-10-05 22:24:47 +00006int foo() __attribute__((aligned(1024)));
7int foo() { }
8
Mike Stump4c83f7c2009-10-05 22:24:47 +00009class C {
Mike Stumpfb51ddf2009-10-05 22:49:20 +000010 virtual void bar1() __attribute__((aligned(1)));
11 virtual void bar2() __attribute__((aligned(2)));
12 virtual void bar3() __attribute__((aligned(1024)));
Mike Stump4c83f7c2009-10-05 22:24:47 +000013} c;
14
Anders Carlsson577cacc2010-01-27 02:49:52 +000015// CHECK: define void @_ZN1C4bar1Ev(%class.C* %this) nounwind align 2
Mike Stump4c83f7c2009-10-05 22:24:47 +000016void C::bar1() { }
17
Anders Carlsson577cacc2010-01-27 02:49:52 +000018// CHECK: define void @_ZN1C4bar2Ev(%class.C* %this) nounwind align 2
Mike Stump4c83f7c2009-10-05 22:24:47 +000019void C::bar2() { }
20
Anders Carlsson577cacc2010-01-27 02:49:52 +000021// CHECK: define void @_ZN1C4bar3Ev(%class.C* %this) nounwind align 1024
Mike Stumpfb51ddf2009-10-05 22:49:20 +000022void C::bar3() { }
John McCallf746aa62010-03-19 23:29:14 +000023
24// PR6635
25// CHECK: define i32 @_Z5test1v()
26int test1() { return 10; }
27// CHECK at top of file
28extern "C" int test2() __attribute__((alias("_Z5test1v")));