llvm-project
17 строк · 633.0 Байт
1## Check for the replacement of calls to identical functions.
2
3REQUIRES: system-linux
4
5RUN: %clangxx %p/Inputs/bolt_icf.cpp -g -Wl,-q -o %t.exe
6RUN: llvm-bolt %t.exe --relocs -o %t --icf 2>&1 | FileCheck %s
7RUN: llvm-nm -n %t | FileCheck %s -check-prefix=CHECK-SYM
8
9CHECK: BOLT-INFO: ICF folded [[#]] out of [[#]] functions in [[#]] passes.
10
11# Check that symbols are updated correctly in the symbol table
12CHECK-SYM-DAG: [[#%x,FIZ:]] T _Z3fizv
13CHECK-SYM-DAG: [[#FIZ]] T _Z3fazv
14CHECK-SYM-DAG: [[#%x,ZIP:]] T _Z3zipv
15CHECK-SYM-DAG: [[#ZIP]] T _Z3zapv
16CHECK-SYM-DAG: [[#%x,FOO:]] T _Z3foov
17CHECK-SYM-DAG: [[#FOO]] T _Z3barv
18