diff options
author | Sean Silva <chisophugis@gmail.com> | 2016-04-06 21:06:52 +0000 |
---|---|---|
committer | Sean Silva <chisophugis@gmail.com> | 2016-04-06 21:06:52 +0000 |
commit | 31994e2eb670e03ec826002df0ae330db8e6c72c (patch) | |
tree | 13341327a3690dacc0d98f1e9df26ce666309d23 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | e77b5bf69f879d650fcf9a76e08c0870901569d0 (diff) | |
download | bcm5719-llvm-31994e2eb670e03ec826002df0ae330db8e6c72c.tar.gz bcm5719-llvm-31994e2eb670e03ec826002df0ae330db8e6c72c.zip |
Revert "Set the default C standard to C99 when targeting the PS4."
This reverts r265359.
It breaks
- llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast
- llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast
Failing Tests (5):
Clang :: FixIt/fixit-errors.c
Clang :: Preprocessor/init.c
Clang :: Sema/attr-deprecated.c
Clang :: Sema/nullability.c
Clang :: SemaObjC/objcbridge-attribute-arc.m
llvm-svn: 265601
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index ba56665bc84..9eedaad9920 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1357,7 +1357,6 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) { } void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK, - const llvm::Triple &T, LangStandard::Kind LangStd) { // Set some properties which depend solely on the input kind; it would be nice // to move these to the language standard, and have the driver resolve the @@ -1390,11 +1389,7 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK, case IK_PreprocessedC: case IK_ObjC: case IK_PreprocessedObjC: - // The PS4 uses C99 as the default C standard. - if (T.isPS4()) - LangStd = LangStandard::lang_gnu99; - else - LangStd = LangStandard::lang_gnu11; + LangStd = LangStandard::lang_gnu11; break; case IK_CXX: case IK_PreprocessedCXX: @@ -1548,8 +1543,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, LangStd = OpenCLLangStd; } - llvm::Triple T(TargetOpts.Triple); - CompilerInvocation::setLangDefaults(Opts, IK, T, LangStd); + CompilerInvocation::setLangDefaults(Opts, IK, LangStd); // We abuse '-f[no-]gnu-keywords' to force overriding all GNU-extension // keywords. This behavior is provided by GCC's poorly named '-fasm' flag, @@ -1872,6 +1866,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, // Provide diagnostic when a given target is not expected to be an OpenMP // device or host. if (Opts.OpenMP && !Opts.OpenMPIsDevice) { + llvm::Triple T(TargetOpts.Triple); switch (T.getArch()) { default: break; |