Home | History | Annotate | Download | only in CodeGenCXX
      1 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s
      2 
      3 // CHECK: @test2 = alias i32 ()* @_Z5test1v
      4 
      5 // CHECK: define i32 @_Z3foov() nounwind align 1024
      6 int foo() __attribute__((aligned(1024)));
      7 int foo() { }
      8 
      9 class C {
     10   virtual void bar1() __attribute__((aligned(1)));
     11   virtual void bar2() __attribute__((aligned(2)));
     12   virtual void bar3() __attribute__((aligned(1024)));
     13 } c;
     14 
     15 // CHECK: define void @_ZN1C4bar1Ev(%class.C* %this) nounwind align 2
     16 void C::bar1() { }
     17 
     18 // CHECK: define void @_ZN1C4bar2Ev(%class.C* %this) nounwind align 2
     19 void C::bar2() { }
     20 
     21 // CHECK: define void @_ZN1C4bar3Ev(%class.C* %this) nounwind align 1024
     22 void C::bar3() { }
     23 
     24 // PR6635
     25 // CHECK: define i32 @_Z5test1v()
     26 int test1() { return 10; }
     27 // CHECK at top of file
     28 extern "C" int test2() __attribute__((alias("_Z5test1v")));
     29