Skip to content

Commit b17f952

Browse files
committed
Add testing for -unified-lto error checking
1 parent 8b96337 commit b17f952

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

llvm/test/LTO/Resolution/X86/unified-lto-check.ll

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@
3838
; RUN: llvm-lto2 run --debug-only=lto -o %t3 %t1 %t2 2>&1 | \
3939
; RUN: FileCheck --allow-empty %s --check-prefix THIN
4040

41+
; Test invalid unified-lto mode causes an error message return.
42+
; RUN: not llvm-lto2 run --unified-lto=foo -o %t3 %t1 %t2 2>&1 | \
43+
; RUN: FileCheck %s --check-prefix INVALIDMODE
44+
; RUN: not llvm-lto2 run --unified-lto="foo" -o %t3 %t1 %t2 2>&1 | \
45+
; RUN: FileCheck %s --check-prefix INVALIDMODE
46+
; RUN: not llvm-lto2 run --unified-lto=1 -o %t3 %t1 %t2 2>&1 | \
47+
; RUN: FileCheck %s --check-prefix INVALIDMODE
48+
49+
; INVALIDMODE: invalid LTO mode
50+
4151
; UNIFIEDERR: unified LTO compilation must use compatible bitcode modules
4252
; NOUNIFIEDERR-NOT: unified LTO compilation must use compatible bitcode modules
4353

@@ -54,3 +64,4 @@
5464

5565
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
5666
target triple = "x86_64-unknown-linux-gnu"
67+

0 commit comments

Comments
 (0)