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
5 ! REQUIRES: plugins, examples, shell
7 ! RUN: %flang_fc1 -load %llvmshlibdir/flangPrintFunctionNames%pluginext -plugin print-fns %s 2>&1 | FileCheck %s
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
15 ! CHECK-NEXT: ==== Functions: 3 ====
16 ! CHECK-NEXT: ==== Subroutines: 2 ====
18 function external_func1()
21 function external_func2()
24 subroutine external_subr
29 function internal_func()
32 subroutine internal_subr