Home | History | Annotate | Download | only in FunctionAttrs
      1 ; RUN: opt < %s -functionattrs -S | FileCheck %s
      2 
      3 ; CHECK: declare noalias i8* @fopen(i8* nocapture readonly, i8* nocapture readonly) #0
      4 declare i8* @fopen(i8*, i8*)
      5 
      6 ; CHECK: declare i8 @strlen(i8* nocapture) #1
      7 declare i8 @strlen(i8*)
      8 
      9 ; CHECK: declare noalias i32* @realloc(i32* nocapture, i32) #0
     10 declare i32* @realloc(i32*, i32)
     11 
     12 ; Test deliberately wrong declaration
     13 declare i32 @strcpy(...)
     14 
     15 ; CHECK-NOT: strcpy{{.*}}noalias
     16 ; CHECK-NOT: strcpy{{.*}}nocapture
     17 ; CHECK-NOT: strcpy{{.*}}nounwind
     18 ; CHECK-NOT: strcpy{{.*}}readonly
     19 
     20 ; CHECK: attributes #0 = { nounwind }
     21 ; CHECK: attributes #1 = { nounwind readonly }
     22