Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / AArch64 / text-data.c
blob2986fe78400789d51cf49808ee116f4af529296d
1 // This test checks that the data object located in text section
2 // is properly emitted in the new section.
4 // RUN: %clang %cflags %s -o %t.exe -Wl,-q
5 // RUN: llvm-bolt %t.exe -o %t.bolt --lite=0 --use-old-text=0
6 // RUN: llvm-objdump -j .text -d --disassemble-symbols=arr %t.bolt | \
7 // RUN: FileCheck %s
9 // CHECK: {{.*}} <arr>:
11 extern void exit(int);
13 typedef void (*FooPtr)();
15 void exitOk() { exit(0); }
17 __attribute__((section(".text"))) const FooPtr arr[] = {exitOk, 0};
19 int main() {
20 arr[0]();
21 return -1;