1 ; RUN: opt < %s -prune-eh -S | FileCheck %s 2 ; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s 3 4 ; We should not infer 'nounwind' for/from a weak function, 5 ; since it can be overriden by throwing implementation. 6 ; 7 ; CHECK-LABEL: define weak void @f() 8 define weak void @f() { 9 entry: 10 ret void 11 } 12 13 ; CHECK-LABEL: define void @g() 14 define void @g() { 15 entry: 16 call void @f() 17 ret void 18 } 19 20 ; CHECK-NOT: {{^}}attributes #{{[0-9].*}} nounwind 21