File: ffunction-sections.ispc

package info (click to toggle)
ispc 1.28.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 97,620 kB
  • sloc: cpp: 77,067; python: 8,303; yacc: 3,337; lex: 1,126; ansic: 631; sh: 475; makefile: 17
file content (18 lines) | stat: -rw-r--r-- 842 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// RUN: %{ispc} %s --target=host --emit-asm -o - | FileCheck %s
// RUN: %{ispc} %s -fno-function-sections --target=host --emit-asm -o - | FileCheck %s
// RUN: %{ispc} %s -ffunction-sections --target=host --emit-asm -o - | FileCheck %s --check-prefix=CHECK-SEC

// REQUIRES: WINDOWS_HOST || LINUX_HOST

// Do not run on macOS, because the behavior of -ffunction-sections is
// different. -ffunction-sections does not create separate sections for
// functions on macOS, although unused functions are still removed if
// -dead_strip is used. In macOS case, we are following clang, which does have
// this option on macOS, but it does nothing.

// CHECK-SEC: .section{{.*}}foo___
// CHECK-SEC: .section{{.*}}foo
// CHECK-NOT: .section        .text.
// CHECK-NOT: .section{{.*}}foo___
// CHECK-NOT: .section{{.*}}foo
export void foo() { return; }