summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2017-02-25 00:15:45 +0000
committerPaul Robinson <paul.robinson@sony.com>2017-02-25 00:15:45 +0000
commit7c344cf2b7298fef780eee891ed79389331ee3e9 (patch)
treec9c19596ce284eae51c065222a3fee541923c71a /clang/lib/Frontend/CompilerInvocation.cpp
parenta8b9cdc9e237b2e9de02bfccaae69b3836f77d14 (diff)
downloadbcm5719-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.cpp6
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;
OpenPOWER on IntegriCloud