This change makes sure that Flang's driver recognises LLVM IR and BC as supported file formats. To this end, `isFortran` is extended and renamed as `isSupportedByFlang` (the latter better reflects the new functionality). New tests are added to verify that the target triple is correctly overridden by the frontend driver's default value or the value specified with `-triple`. Strictly speaking, this is not a functionality that's new in this patch (it was added in D124664). This patch simply enables us to write such tests and hence I'm including them here. Differential Revision: https://reviews.llvm.org/D124667
22 lines
504 B
LLVM
22 lines
504 B
LLVM
; Verify that the module triple is overridden by the driver - even when the
|
|
; module triple is missing.
|
|
; NOTE: At the time of writing, the tested behaviour was consistent with Clang
|
|
|
|
;-------------
|
|
; RUN COMMANDS
|
|
;-------------
|
|
; RUN: %flang_fc1 -S %s -o - 2>&1 | FileCheck %s
|
|
; RUN: %flang -S %s -o - 2>&1 | FileCheck %s
|
|
|
|
;----------------
|
|
; EXPECTED OUTPUT
|
|
;----------------
|
|
; CHECK: warning: overriding the module target triple with {{.*}}
|
|
|
|
;------
|
|
; INPUT
|
|
;------
|
|
define void @foo() {
|
|
ret void
|
|
}
|