]> granicus.if.org Git - clang/commitdiff
[PS4] Set our default dialect to C++11. NFC for other targets.
authorPaul Robinson <paul.robinson@sony.com>
Sat, 25 Feb 2017 00:15:45 +0000 (00:15 +0000)
committerPaul Robinson <paul.robinson@sony.com>
Sat, 25 Feb 2017 00:15:45 +0000 (00:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296209 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/CompilerInvocation.cpp

index 2ef96398c0d9d5d20482b75a9cfcd1d1ffd6560c..46c60e5da8e941376bb85562043b05fc8f20d87f 100644 (file)
@@ -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;