Skip to content

Commit

Permalink
[Driver][test] Clean up -fsplit-machine-function tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Aug 24, 2023
1 parent 5ec1353 commit 426c2c4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
26 changes: 18 additions & 8 deletions clang/test/Driver/fsplit-machine-functions.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
// REQUIRES: arm-registered-target
// RUN: %clang -### --target=x86_64 -fprofile-use=default.profdata -fsplit-machine-functions %s 2>&1 | FileCheck %s --check-prefixes=CHECK,LTO-NEG
// RUN: %clang -### --target=x86_64 -fprofile-use=default.profdata -fsplit-machine-functions -fno-split-machine-functions %s -c 2>&1 | FileCheck -check-prefix=NEG %s

// RUN: %clang -### -target x86_64 -fprofile-use=default.profdata -fsplit-machine-functions %s -c 2>&1 | FileCheck -check-prefix=CHECK-OPT %s
// RUN: %clang -### -target x86_64 -fsplit-machine-functions %s -c 2>&1 | FileCheck -check-prefix=CHECK-OPT %s
// RUN: %clang -### -target x86_64 -fprofile-use=default.profdata -fsplit-machine-functions -fno-split-machine-functions %s -c 2>&1 | FileCheck -check-prefix=CHECK-NOOPT %s
// RUN: not %clang -c -target arm-unknown-linux -fsplit-machine-functions %s 2>&1 | FileCheck -check-prefix=CHECK-TRIPLE %s
// CHECK: "-fsplit-machine-functions"
// CHECK-SAME: "-fprofile-instrument-use-path=default.profdata"

// CHECK-OPT: "-fsplit-machine-functions"
// CHECK-NOOPT-NOT: "-fsplit-machine-functions"
// CHECK-TRIPLE: error: unsupported option '-fsplit-machine-functions' for target
// NEG-NOT: "-fsplit-machine-functions"

// RUN: %clang -### --target=x86_64-linux -flto -fsplit-machine-functions %s 2>&1 | FileCheck %s --check-prefix=LTO
// RUN: %clang -### --target=x86_64-linux -flto -fsplit-machine-functions -fno-split-machine-functions %s 2>&1 | FileCheck %s --check-prefix=LTO-NEG

// LTO: "-plugin-opt=-split-machine-functions"
// LTO-NEG-NOT: "-plugin-opt=-split-machine-functions"

// RUN: not %clang -### -c --target=arm-unknown-linux -fsplit-machine-functions %s 2>&1 | FileCheck %s --check-prefix=ERR
// ERR: error: unsupported option '-fsplit-machine-functions' for target

/// FIXME
// RUN: not %clang -### -c --target=arm-unknown-linux -fsplit-machine-functions -fno-split-machine-functions %s 2>&1 | FileCheck %s --check-prefix=ERR2
// ERR2: error: unsupported option '-fno-split-machine-functions' for target
12 changes: 0 additions & 12 deletions clang/test/Driver/fsplit-machine-functions2.c

This file was deleted.

0 comments on commit 426c2c4

Please sign in to comment.