} // let Visibility = [CC1Option]
defm err_pragma_mc_func_aix : BoolFOption<"err-pragma-mc-func-aix",
- PreprocessorOpts<"ErrorOnPragmaMcfuncOnAIX">, DefaultTrue,
- PosFlag<SetTrue, [], [ClangOption],
+ PreprocessorOpts<"ErrorOnPragmaMcfuncOnAIX">, DefaultFalse,
+ PosFlag<SetTrue, [], [ClangOption, CC1Option],
"Treat uses of #pragma mc_func as errors">,
NegFlag<SetFalse,[], [ClangOption, CC1Option],
"Ignore uses of #pragma mc_func">>;
/// If set, the preprocessor reports an error when processing #pragma mc_func
/// on AIX.
- bool ErrorOnPragmaMcfuncOnAIX = true;
+ bool ErrorOnPragmaMcfuncOnAIX = false;
public:
PreprocessorOptions() : PrecompiledPreambleBytes(0, false) {}
PrecompiledPreambleBytes.first = 0;
PrecompiledPreambleBytes.second = false;
RetainExcludedConditionalBlocks = false;
- ErrorOnPragmaMcfuncOnAIX = true;
+ ErrorOnPragmaMcfuncOnAIX = false;
}
};
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))
+ if (Args.hasFlag(options::OPT_ferr_pragma_mc_func_aix,
+ options::OPT_fno_err_pragma_mc_func_aix, false))
+ CC1Args.push_back("-ferr-pragma-mc-func-aix");
+ else
CC1Args.push_back("-fno-err-pragma-mc-func-aix");
}
-// 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
// RUN: %clang --target=powerpc64-ibm-aix -fno-err-pragma-mc-func-aix -fsyntax-only %s
// RUN: %clang --target=powerpc64-ibm-aix -ferr-pragma-mc-func-aix -fsyntax-only \
// RUN: -fno-err-pragma-mc-func-aix %s
+// RUN: %clang --target=powerpc64-ibm-aix -fsyntax-only %s
// RUN: %clang --target=powerpc64-ibm-aix -Werror=unknown-pragmas \
// RUN: -fno-err-pragma-mc-func-aix -fsyntax-only %s
-// Cases on a non-AIX target.
+// Cases where we have errors or warnings.
// RUN: not %clang --target=powerpc64le-unknown-linux-gnu \
// RUN: -Werror=unknown-pragmas -fno-err-pragma-mc-func-aix -fsyntax-only %s 2>&1 | \
// RUN: FileCheck --check-prefix=UNUSED %s