summaryrefslogtreecommitdiff
path: root/flang/test/Driver/override-triple.ll
blob: f2d9f47ac8f0aed034f79ff9ca4b30a617391c8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
; Verify that the module triple is overridden by the driver - even in the presence
; of a module triple.
; NOTE: At the time of writing, the tested behaviour was consistent with Clang

; RUN: %flang_fc1 -S %s -o - 2>&1 | FileCheck %s
; RUN: %flang -S  %s -o - 2>&1 | FileCheck %s

; CHECK: warning: overriding the module target triple with {{.*}}

; For the triple to be overridden by the driver, it needs to be different to the host triple.
; Use a random string to guarantee that.
target triple = "invalid-triple"

define void @foo() {
  ret void
}