17 lines · plain
1! Test the `-mllvm` option2 3! 1. Test typical usage.4! RUN: %flang -S -mllvm -print-before-all %s -o - 2>&1 | FileCheck %s --check-prefix=OUTPUT5! RUN: %flang_fc1 -S -mllvm -print-before-all %s -o - 2>&1 | FileCheck %s --check-prefix=OUTPUT6 7! 2. Test invalid usage (`-print-before` requires an argument)8! RUN: not %flang -S -mllvm -print-before %s -o - 2>&1 | FileCheck %s --check-prefix=INVALID_USAGE9 10! OUTPUT: *** IR Dump Before Pre-ISel Intrinsic Lowering (pre-isel-intrinsic-lowering) ***11! OUTPUT-NEXT: ; ModuleID = 'FIRModule'12! OUTPUT-NEXT: source_filename = "FIRModule"13 14! INVALID_USAGE: flang (LLVM option parsing): for the --print-before option: requires a value!15 16end program17