3 # RUN: llvm-mc -emit-compact-unwind-non-canonical=true -filetype=obj -triple=x86_64-apple-darwin19.0.0 %s -o %t.o
4 # RUN: not %lld -lSystem -lc++ %t.o -o %t 2>&1 | FileCheck %s --check-prefix=TOO-MANY
5 # RUN: not %lld -lSystem %t.o -o %t 2>&1 | FileCheck %s --check-prefix=UNDEF
6 # TOO-MANY: error: too many personalities (4) for compact unwind to encode
7 # UNDEF: error: undefined symbol: ___gxx_personality_v0
9 ## Tests that we can handle more than 3 personalities with DWARFs
10 # RUN: llvm-mc -emit-compact-unwind-non-canonical=false -filetype=obj -triple=x86_64-apple-darwin19.0.0 %s -o %t-dwarf.o
11 # RUN: %lld -lSystem -lc++ %t-dwarf.o -o %t-dwarf
12 # RUN: llvm-objdump --macho --indirect-symbols --dwarf=frames %t-dwarf | FileCheck %s --check-prefix=DWARF -D#BASE=0x100000000
14 # DWARF: Indirect symbols
15 # DWARF: address index name
16 # DWARF: 0x[[#%x,GXX_PERSONALITY:]] {{.*}} ___gxx_personality_v0
17 # DWARF: 0x[[#%x,PERSONALITY_1:]] {{.*}} _personality_1
18 # DWARF: 0x[[#%x,PERSONALITY_2:]] {{.*}} _personality_2
19 # DWARF: 0x[[#%x,PERSONALITY_3:]] {{.*}} _personality_3
20 # DWARF: .eh_frame contents:
21 # DWARF: Personality Address: [[#%.16x,GXX_PERSONALITY]]
22 # DWARF: Personality Address: [[#%.16x,PERSONALITY_1]]
23 # DWARF: Personality Address: [[#%.16x,PERSONALITY_2]]
24 # DWARF: Personality Address: [[#%.16x,PERSONALITY_3]]
27 .globl _main, _personality_1, _personality_2, _personality_3
33 .cfi_personality 155, _personality_1
34 .cfi_def_cfa_offset 16
40 .cfi_personality 155, _personality_2
41 .cfi_def_cfa_offset 16
47 .cfi_personality 155, _personality_3
48 .cfi_def_cfa_offset 16
54 .cfi_personality 155, ___gxx_personality_v0
55 .cfi_def_cfa_offset 16