Skip to content

Commit

Permalink
Remove unnecessary CC1 option.
Browse files Browse the repository at this point in the history
  • Loading branch information
Qiongsi Wu committed Jul 31, 2024
1 parent e823d1e commit 16280f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -8098,7 +8098,7 @@ def source_date_epoch : Separate<["-"], "source-date-epoch">,

defm err_pragma_mc_func_aix : BoolFOption<"err-pragma-mc-func-aix",
PreprocessorOpts<"ErrorOnPragmaMcfuncOnAIX">, DefaultTrue,
PosFlag<SetTrue, [], [ClangOption, CC1Option],
PosFlag<SetTrue, [], [ClangOption],
"Treat uses of #pragma mc_func as errors">,
NegFlag<SetFalse,[], [ClangOption, CC1Option],
"Ignore uses of #pragma mc_func">>;
Expand Down
6 changes: 2 additions & 4 deletions clang/lib/Driver/ToolChains/AIX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,10 +561,8 @@ void AIX::addClangTargetOptions(
options::OPT_fno_sized_deallocation))
CC1Args.push_back("-fno-sized-deallocation");

if (Args.hasFlag(options::OPT_ferr_pragma_mc_func_aix,
options::OPT_fno_err_pragma_mc_func_aix, true))
CC1Args.push_back("-ferr-pragma-mc-func-aix");
else
if (!Args.hasFlag(options::OPT_ferr_pragma_mc_func_aix,
options::OPT_fno_err_pragma_mc_func_aix, true))
CC1Args.push_back("-fno-err-pragma-mc-func-aix");
}

Expand Down
2 changes: 2 additions & 0 deletions clang/test/Preprocessor/pragma_mc_func.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// RUN: not %clang --target=powerpc64-ibm-aix -fsyntax-only %s 2>&1 | FileCheck %s
// RUN: not %clang --target=powerpc64-ibm-aix -ferr-pragma-mc-func-aix -fsyntax-only \
// RUN: %s 2>&1 | FileCheck %s
// RUN: not %clang --target=powerpc64-ibm-aix -fno-err-pragma-mc-func-aix \
// RUN: -ferr-pragma-mc-func-aix -fsyntax-only %s 2>&1 | FileCheck %s
#pragma mc_func asm_barrier {"60000000"}

// CHECK: error: #pragma mc_func is not supported
Expand Down

0 comments on commit 16280f9

Please sign in to comment.