68 lines · plain
1# REQUIRES: x862# RUN: rm -rf %t; mkdir %t3 4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/main.o5# RUN: %lld -lSystem --icf=all -o %t/all %t/main.o 2>&1 \6# RUN: | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty7# RUN: %lld -lSystem --icf=none -o %t/none %t/main.o 2>&1 \8# RUN: | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty9# RUN: %lld -lSystem -no_deduplicate -o %t/no_dedup %t/main.o 2>&1 \10# RUN: | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty11# RUN: %lld -lSystem --icf=safe -o %t/safe %t/main.o 2>&1 \12# RUN: | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty13# RUN: not %lld -lSystem --icf=junk -o %t/junk %t/main.o 2>&1 \14# RUN: | FileCheck %s --check-prefix=DIAG-JUNK15# RUN: %lld -lSystem --icf=all -no_deduplicate -o %t/none2 %t/main.o 2>&1 \16# RUN: | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty17# RUN: %lld -lSystem -no_deduplicate --icf=all -o %t/all2 %t/main.o 2>&1 \18# RUN: | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty19 20# DIAG-EMPTY-NOT: {{.}}21# DIAG-JUNK: unknown --icf=OPTION `junk', defaulting to `none'22 23# RUN: llvm-objdump -d --syms %t/all | FileCheck %s --check-prefix=FOLD24# RUN: llvm-objdump -d --syms %t/all2 | FileCheck %s --check-prefix=FOLD25# RUN: llvm-objdump -d --syms %t/none | FileCheck %s --check-prefix=NOOP26# RUN: llvm-objdump -d --syms %t/none2 | FileCheck %s --check-prefix=NOOP27# RUN: llvm-objdump -d --syms %t/no_dedup | FileCheck %s --check-prefix=NOOP28 29# FOLD-LABEL: SYMBOL TABLE:30# FOLD: [[#%x,MAIN:]] g F __TEXT,__text _main31# FOLD: [[#%x,F:]] g F __TEXT,__text _f132# FOLD: [[#%x,F]] g F __TEXT,__text _f233 34# FOLD-LABEL: Disassembly of section __TEXT,__text:35# FOLD: [[#%x,MAIN]] <_main>:36# FOLD-NEXT: callq 0x[[#%x,F]] <_f2>37# FOLD-NEXT: callq 0x[[#%x,F]] <_f2>38 39# NOOP-LABEL: SYMBOL TABLE:40# NOOP: [[#%x,MAIN:]] g F __TEXT,__text _main41# NOOP: [[#%x,F1:]] g F __TEXT,__text _f142# NOOP: [[#%x,F2:]] g F __TEXT,__text _f243 44# NOOP-LABEL: Disassembly of section __TEXT,__text:45# NOOP: [[#%x,MAIN]] <_main>:46# NOOP-NEXT: callq 0x[[#%x,F1]] <_f1>47# NOOP-NEXT: callq 0x[[#%x,F2]] <_f2>48 49.subsections_via_symbols50.text51.p2align 252 53.globl _f154_f1:55 movl $0, %eax56 ret57 58.globl _f259_f2:60 movl $0, %eax61 ret62 63.globl _main64_main:65 callq _f166 callq _f267 ret68