1 ! Test the `-mllvm` option
3 ! 1. Test typical usage.
4 ! RUN: %flang -S -mllvm -print-before-all %s -o - 2>&1 | FileCheck %s --check-prefix=OUTPUT
5 ! RUN: %flang_fc1 -S -mllvm -print-before-all %s -o - 2>&1 | FileCheck %s --check-prefix=OUTPUT
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_USAGE
10 ! OUTPUT: *** IR Dump Before Pre-ISel Intrinsic Lowering (pre-isel-intrinsic-lowering) ***
11 ! OUTPUT-NEXT: ; ModuleID = 'FIRModule'
12 ! OUTPUT-NEXT: source_filename = "FIRModule"
14 ! INVALID_USAGE: flang (LLVM option parsing): for the --print-before option: requires a value!