3 ;; A bitcode file can generate undefined references to symbols that weren't
4 ;; listed as undefined on the bitcode file itself, if there's a reference to
5 ;; an unexpected personality routine via asm(). If the personality function
6 ;; is provided as LTO bitcode, the linker would hit an unhandled state.
9 ; RUN: split-file %s %t.dir
10 ; RUN: llvm-as %t.dir/main.ll -o %t.main.obj
11 ; RUN: llvm-as %t.dir/other.ll -o %t.other.obj
12 ; RUN: llvm-as %t.dir/personality.ll -o %t.personality.obj
13 ; RUN: llvm-ar rcs %t.personality.lib %t.personality.obj
15 ; RUN: env LLD_IN_TEST=1 not lld-link /entry:entry %t.main.obj %t.other.obj %t.personality.lib /out:%t.exe /subsystem:console /opt:lldlto=0 /debug:symtab 2>&1 | FileCheck %s
17 ; CHECK: error: LTO object file lto-late-personality.ll.tmp.personality.lib(lto-late-personality.ll.tmp.personality.obj) linked in after doing LTO compilation.
20 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
21 target triple = "x86_64-w64-windows-gnu"
25 tail call void @other()
26 tail call void asm sideeffect ".seh_handler __C_specific_handler, @except\0A", "~{dirflag},~{fpsr},~{flags}"()
30 declare dso_local void @other()
33 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
34 target triple = "x86_64-w64-windows-gnu"
36 define dso_local void @other() {
42 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
43 target triple = "x86_64-w64-windows-gnu"
45 define void @__C_specific_handler() {