Bill Wendling | 84ba976 | 2013-02-11 08:34:57 +0000 | [diff] [blame^] | 1 | ; RUN: opt < %s -simplify-libcalls -S | FileCheck %s |
Nick Lewycky | 959af7b | 2009-01-04 20:27:34 +0000 | [diff] [blame] | 2 | |
Bill Wendling | 84ba976 | 2013-02-11 08:34:57 +0000 | [diff] [blame^] | 3 | ; CHECK: declare noalias i8* @fopen(i8* nocapture, i8* nocapture) nounwind |
Nick Lewycky | 959af7b | 2009-01-04 20:27:34 +0000 | [diff] [blame] | 4 | declare i8* @fopen(i8*, i8*) |
Bill Wendling | 84ba976 | 2013-02-11 08:34:57 +0000 | [diff] [blame^] | 5 | |
| 6 | ; CHECK: declare i8 @strlen(i8* nocapture) nounwind readonly |
Nick Lewycky | 959af7b | 2009-01-04 20:27:34 +0000 | [diff] [blame] | 7 | declare i8 @strlen(i8*) |
Bill Wendling | 84ba976 | 2013-02-11 08:34:57 +0000 | [diff] [blame^] | 8 | |
| 9 | ; CHECK: declare noalias i32* @realloc(i32* nocapture, i32) nounwind |
Nick Lewycky | e5be1cd | 2009-01-18 04:46:10 +0000 | [diff] [blame] | 10 | declare i32* @realloc(i32*, i32) |
Nick Lewycky | 959af7b | 2009-01-04 20:27:34 +0000 | [diff] [blame] | 11 | |
| 12 | ; Test deliberately wrong declaration |
| 13 | declare i32 @strcpy(...) |
Bill Wendling | 84ba976 | 2013-02-11 08:34:57 +0000 | [diff] [blame^] | 14 | |
| 15 | ; CHECK-NOT: strcpy{{.*}}noalias |
| 16 | ; CHECK-NOT: strcpy{{.*}}nocapture |
| 17 | ; CHECK-NOT: strcpy{{.*}}nounwind |
| 18 | ; CHECK-NOT: strcpy{{.*}}readonly |