
The intent of the negative #{{.*}} checks is to verify that the line declaring/defining a function has no attribute, but they could restrict later function declarations instead. The 2008-09-02-FunctionNotes.ll check had allowed @fn3 to have an attribute, because there is only a single "define void @fn3()" in the output. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D107614
22 lines
407 B
LLVM
22 lines
407 B
LLVM
; Test function attributes
|
|
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
|
|
; RUN: verify-uselistorder %s
|
|
|
|
; CHECK: define void @fn1() #0 {
|
|
define void @fn1() alwaysinline {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: define void @fn2() #1 {
|
|
define void @fn2() noinline {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: define void @fn3() {
|
|
define void @fn3() {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: attributes #0 = { alwaysinline }
|
|
; CHECK: attributes #1 = { noinline }
|