Files
clang-p2996/flang/test/Driver/emit-llvm.f90
Andrzej Warzynski e993b20c04 [flang][driver] Add support for -emit-llvm
This patch adds support for the `-emit-llvm` option in the frontend
driver (i.e. `flang-new -fc1`). Similarly to Clang, `flang-new -fc1
-emit-llvm file.f` will generate a textual LLVM IR file.

Depends on D118985

Differential Revision: https://reviews.llvm.org/D119012
2022-02-17 12:13:03 +00:00

23 lines
434 B
Fortran

! Test the `-emit-llvm` option
! UNSUPPORTED: system-windows
! Windows is currently not supported in flang/lib/Optimizer/CodeGen/Target.cpp
!------------
! RUN COMMAND
!------------
! RUN: %flang_fc1 -emit-llvm %s -o - | FileCheck %s
!----------------
! EXPECTED OUTPUT
!----------------
! CHECK: ; ModuleID = 'FIRModule'
! CHECK: define void @_QQmain()
! CHECK-NEXT: ret void
! CHECK-NEXT: }
!------
! INPUT
!------
end program