From 7c344cf2b7298fef780eee891ed79389331ee3e9 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Sat, 25 Feb 2017 00:15:45 +0000 Subject: [PS4] Set our default dialect to C++11. NFC for other targets. llvm-svn: 296209 --- clang/lib/Frontend/CompilerInvocation.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 2ef9639..46c60e5 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; -- cgit v1.1