diff options
author | Paul Robinson <paul.robinson@sony.com> | 2017-02-25 00:15:45 +0000 |
---|---|---|
committer | Paul Robinson <paul.robinson@sony.com> | 2017-02-25 00:15:45 +0000 |
commit | 7c344cf2b7298fef780eee891ed79389331ee3e9 (patch) | |
tree | c9c19596ce284eae51c065222a3fee541923c71a /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | a8b9cdc9e237b2e9de02bfccaae69b3836f77d14 (diff) | |
download | bcm5719-llvm-7c344cf2b7298fef780eee891ed79389331ee3e9.tar.gz bcm5719-llvm-7c344cf2b7298fef780eee891ed79389331ee3e9.zip |
[PS4] Set our default dialect to C++11. NFC for other targets.
llvm-svn: 296209
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 2ef96398c0d..46c60e5da8e 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1582,7 +1582,11 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK, case IK_PreprocessedCXX: case IK_ObjCXX: case IK_PreprocessedObjCXX: - LangStd = LangStandard::lang_gnucxx98; + // The PS4 uses C++11 as the default C++ standard. + if (T.isPS4()) + LangStd = LangStandard::lang_gnucxx11; + else + LangStd = LangStandard::lang_gnucxx98; break; case IK_RenderScript: LangStd = LangStandard::lang_c99; |