1! Check the Flang Print Function Names example plugin prints and counts function/subroutine definitions 2! This includes internal and external Function/Subroutines, but not Statement Functions 3! This requires that the examples are built (LLVM_BUILD_EXAMPLES=ON) to access flangPrintFunctionNames.so 4 5! REQUIRES: plugins, examples, shell 6 7! RUN: %flang_fc1 -load %llvmshlibdir/flangPrintFunctionNames%pluginext -plugin print-fns %s 2>&1 | FileCheck %s 8 9! CHECK: Function: external_func1 10! CHECK-NEXT: Function: external_func2 11! CHECK-NEXT: Subroutine: external_subr 12! CHECK-NEXT: Function: internal_func 13! CHECK-NEXT: Subroutine: internal_subr 14! CHECK-EMPTY: 15! CHECK-NEXT: ==== Functions: 3 ==== 16! CHECK-NEXT: ==== Subroutines: 2 ==== 17 18function external_func1() 19end function 20 21function external_func2() 22end function 23 24subroutine external_subr 25end subroutine 26 27program main 28contains 29 function internal_func() 30 end function 31 32 subroutine internal_subr 33 end subroutine 34end program main 35