35 lines · plain
1! Check the Flang Print Function Names example plugin prints and counts function/subroutine definitions2! This includes internal and external Function/Subroutines, but not Statement Functions3! This requires that the examples are built (LLVM_BUILD_EXAMPLES=ON) to access flangPrintFunctionNames.so4 5! REQUIRES: plugins, examples, shell6 7! RUN: %flang_fc1 -load %llvmshlibdir/flangPrintFunctionNames%pluginext -plugin print-fns %s 2>&1 | FileCheck %s8 9! CHECK: Function: external_func110! CHECK-NEXT: Function: external_func211! CHECK-NEXT: Subroutine: external_subr12! CHECK-NEXT: Function: internal_func13! CHECK-NEXT: Subroutine: internal_subr14! CHECK-EMPTY:15! CHECK-NEXT: ==== Functions: 3 ====16! CHECK-NEXT: ==== Subroutines: 2 ====17 18function external_func1()19end function20 21function external_func2()22end function23 24subroutine external_subr25end subroutine26 27program main28contains29 function internal_func()30 end function31 32 subroutine internal_subr33 end subroutine34end program main35