1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/test/Transforms/FunctionAttrs/operand-bundles-scc.ll
Brian Homerding ed0ab9dc76 Add, and infer, a nofree function attribute
This patch adds a function attribute, nofree, to indicate that a function does
not, directly or indirectly, call a memory-deallocation function (e.g., free,
C++'s operator delete).

Reviewers: jdoerfert

Differential Revision: https://reviews.llvm.org/D49165

llvm-svn: 365336
2019-07-08 15:57:56 +00:00

18 lines
341 B
LLVM

; RUN: opt -S -functionattrs < %s | FileCheck %s
; RUN: opt -S -passes=function-attrs < %s | FileCheck %s
define void @f() {
; CHECK-LABEL: define void @f() #0 {
call void @g() [ "unknown"() ]
ret void
}
define void @g() {
; CHECK-LABEL: define void @g() #0 {
call void @f()
ret void
}
; CHECK: attributes #0 = { nofree nounwind }