Skip to content

Commit 7cd9c8a

Browse files
committed
[𝘀𝗽𝗿] initial version
Created using spr 1.3.5-bogner
1 parent d1fae59 commit 7cd9c8a

File tree

4 files changed

+10
-17
lines changed

4 files changed

+10
-17
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,8 +1729,6 @@ defm gnu_inline_asm : BoolFOption<"gnu-inline-asm",
17291729
"Disable GNU style inline asm">,
17301730
PosFlag<SetTrue>>;
17311731

1732-
def fprofile_sample_use : Flag<["-"], "fprofile-sample-use">, Group<f_Group>,
1733-
Visibility<[ClangOption, CLOption]>;
17341732
def fno_profile_sample_use : Flag<["-"], "fno-profile-sample-use">, Group<f_Group>,
17351733
Visibility<[ClangOption, CLOption]>;
17361734
def fprofile_sample_use_EQ : Joined<["-"], "fprofile-sample-use=">,
@@ -1756,8 +1754,6 @@ def fsample_profile_use_profi : Flag<["-"], "fsample-profile-use-profi">,
17561754
basic block counts to branch probabilites to fix them by extended
17571755
and re-engineered classic MCMF (min-cost max-flow) approach.}]>;
17581756
def fno_profile_sample_accurate : Flag<["-"], "fno-profile-sample-accurate">, Group<f_Group>;
1759-
def fauto_profile : Flag<["-"], "fauto-profile">, Group<f_Group>,
1760-
Alias<fprofile_sample_use>;
17611757
def fno_auto_profile : Flag<["-"], "fno-auto-profile">, Group<f_Group>,
17621758
Alias<fno_profile_sample_use>;
17631759
def fauto_profile_EQ : Joined<["-"], "fauto-profile=">,

clang/lib/Driver/ToolChains/CommonArgs.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,18 +1758,13 @@ Arg *tools::getLastProfileUseArg(const ArgList &Args) {
17581758

17591759
Arg *tools::getLastProfileSampleUseArg(const ArgList &Args) {
17601760
auto *ProfileSampleUseArg = Args.getLastArg(
1761-
options::OPT_fprofile_sample_use, options::OPT_fprofile_sample_use_EQ,
1762-
options::OPT_fauto_profile, options::OPT_fauto_profile_EQ,
1763-
options::OPT_fno_profile_sample_use, options::OPT_fno_auto_profile);
1764-
1765-
if (ProfileSampleUseArg &&
1766-
(ProfileSampleUseArg->getOption().matches(
1767-
options::OPT_fno_profile_sample_use) ||
1768-
ProfileSampleUseArg->getOption().matches(options::OPT_fno_auto_profile)))
1761+
options::OPT_fprofile_sample_use_EQ, options::OPT_fno_profile_sample_use);
1762+
1763+
if (ProfileSampleUseArg && (ProfileSampleUseArg->getOption().matches(
1764+
options::OPT_fno_profile_sample_use)))
17691765
return nullptr;
17701766

1771-
return Args.getLastArg(options::OPT_fprofile_sample_use_EQ,
1772-
options::OPT_fauto_profile_EQ);
1767+
return Args.getLastArg(options::OPT_fprofile_sample_use_EQ);
17731768
}
17741769

17751770
const char *tools::RelocationModelName(llvm::Reloc::Model Model) {

clang/test/Driver/clang_f_opts.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@
7171
// RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof -fno-auto-profile %s 2>&1 | FileCheck -check-prefix=CHECK-NO-AUTO-PROFILE %s
7272
// CHECK-NO-AUTO-PROFILE-NOT: "-fprofile-sample-use={{.*}}/file.prof"
7373

74-
// RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof -fno-profile-sample-use -fauto-profile %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s
75-
// RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof -fno-auto-profile -fprofile-sample-use %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s
76-
7774
// RUN: %clang -### -S -fprofile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-LLVM %s
7875
// RUN: %clang -### -S -fprofile-instr-generate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE %s
7976
// RUN: %clang -### -S -fprofile-generate=/some/dir %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-DIR %s
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// GCC -fauto-profile (without =) is rejected.
2+
/// -fprofile-sample-use without = is rejected as well.
3+
// RUN: not %clang -### -S -fauto-profile -fprofile-sample-use %s 2>&1 | FileCheck %s --check-prefix=ERR
4+
// ERR: error: unknown argument: '-fauto-profile'
5+
// ERR: error: unknown argument: '-fprofile-sample-use'

0 commit comments

Comments
 (0)