Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / RISCV / unnamed-sym-no-entry.c
blob605bbc00aeec4638deaaef54f2505c361055e76f
1 /// Verify that unnamed symbols are not added as function entry points. Such
2 /// symbols are used by relocations in debugging sections.
4 // clang-format off
6 // RUN: %clang %cflags -g -Wl,-q -o %t %s
8 /// Verify that the binary indeed contains an unnamed symbol at _start
9 // RUN: llvm-readelf -s %t | FileCheck %s --check-prefix=CHECK-ELF
10 // CHECK-ELF-DAG: [[#%x,START:]] {{.*}} FUNC GLOBAL DEFAULT [[#%d,SECTION:]] _start{{$}}
11 // CHECK-ELF-DAG: [[#%x,START]] {{.*}} NOTYPE LOCAL DEFAULT [[#SECTION]] {{$}}
13 /// Verify that BOLT did not create an extra entry point for the unnamed symbol
14 // RUN: llvm-bolt -o %t.bolt %t --print-cfg | FileCheck %s
15 // CHECK: Binary Function "_start" after building cfg {
16 // CHECK: IsMultiEntry: 0
18 void _start() {}