2019-04-17 12:52:47 +08:00
|
|
|
; RUN: opt < %s -functionattrs -S | FileCheck %s
|
|
|
|
; RUN: opt < %s -passes=function-attrs -S | FileCheck %s
|
|
|
|
|
2019-08-03 22:28:34 +08:00
|
|
|
; CHECK: define void @bar(i8* nocapture readnone %0)
|
|
|
|
define void @bar(i8* readonly %0) {
|
2019-04-17 12:52:47 +08:00
|
|
|
call void @foo(i8* %0)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-08-03 22:28:34 +08:00
|
|
|
; CHECK: define void @foo(i8* nocapture readnone %0)
|
|
|
|
define void @foo(i8* readonly %0) {
|
2019-04-17 12:52:47 +08:00
|
|
|
call void @bar(i8* %0)
|
|
|
|
ret void
|
|
|
|
}
|