xref: /llvm-project/bolt/test/X86/icf-jump-tables.test (revision 887f7002b65f7376c7a5004535bd08c95bdaa8f8)
1## Check that BOLT folds functions with jump tables and does not report
2## undefined symbols.
3
4# REQUIRES: system-linux
5
6# RUN: %clang %cflags -O1 -g %p/../Inputs/icf-jump-tables.c -o %t.exe -Wl,-q
7# RUN: llvm-bolt %t.exe --icf -o %t.bolt 2>&1 | FileCheck %s
8
9## Check that BOLT successfully folded a function with jump table:
10# CHECK: ICF folded {{.*}}. {{[^0]}} functions had jump tables.
11
12## Check that no relocations against undefined symbols were emitted:
13# CHECK-NOT: Undefined temporary symbol
14