This revision was automatically updated to reflect the committed changes.
Closed by commit rGcecb0e98d4b1: [HIP] stop forcing the lang std in the driver 
(authored by scchan).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134314/new/

https://reviews.llvm.org/D134314

Files:
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/Driver/hip-std.hip


Index: clang/test/Driver/hip-std.hip
===================================================================
--- clang/test/Driver/hip-std.hip
+++ clang/test/Driver/hip-std.hip
@@ -3,8 +3,10 @@
 
 // RUN: %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \
 // RUN:   2>&1 | FileCheck -check-prefixes=DEFAULT %s
-// DEFAULT: "-cc1"{{.*}}"-fcuda-is-device"{{.*}}"-std=c++11"
-// DEFAULT: "-cc1"{{.*}}"-std=c++11"
+// DEFAULT: "-cc1"{{.*}}"-fcuda-is-device"{{.*}}
+// DEFAULT-NOT: "-std="{{.*}}
+// DEFAULT: "-cc1"{{.*}}
+// DEFAULT-NOT: "-std="{{.*}}
 
 // RUN: %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \
 // RUN:   -std=c++17 %s 2>&1 | FileCheck -check-prefixes=SPECIFIED %s
@@ -13,8 +15,10 @@
 
 // RUN: %clang -### --target=x86_64-pc-windows-msvc -offload-arch=gfx906 %s \
 // RUN:   2>&1 | FileCheck -check-prefixes=MSVC-DEF %s
-// MSVC-DEF: "-cc1"{{.*}}"-fcuda-is-device"{{.*}}"-std=c++14"
-// MSVC-DEF: "-cc1"{{.*}}"-std=c++14"
+// MSVC-DEF: "-cc1"{{.*}}"-fcuda-is-device"{{.*}}
+// MSVC-DEF-NOT: "-std="{{.*}}
+// MSVC-DEF: "-cc1"{{.*}}
+// MSVC-DEF-NOT: "-std="{{.*}}
 
 // RUN: %clang -### --target=x86_64-pc-windows-msvc -offload-arch=gfx906 %s \
 // RUN:   -std=c++17 %s 2>&1 | FileCheck -check-prefixes=MSVC-SPEC %s
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -5882,11 +5882,6 @@
 
     Args.AddLastArg(CmdArgs, options::OPT_ftrigraphs,
                     options::OPT_fno_trigraphs);
-
-    // HIP headers has minimum C++ standard requirements. Therefore set the
-    // default language standard.
-    if (IsHIP)
-      CmdArgs.push_back(IsWindowsMSVC ? "-std=c++14" : "-std=c++11");
   }
 
   // GCC's behavior for -Wwrite-strings is a bit strange:


Index: clang/test/Driver/hip-std.hip
===================================================================
--- clang/test/Driver/hip-std.hip
+++ clang/test/Driver/hip-std.hip
@@ -3,8 +3,10 @@
 
 // RUN: %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \
 // RUN:   2>&1 | FileCheck -check-prefixes=DEFAULT %s
-// DEFAULT: "-cc1"{{.*}}"-fcuda-is-device"{{.*}}"-std=c++11"
-// DEFAULT: "-cc1"{{.*}}"-std=c++11"
+// DEFAULT: "-cc1"{{.*}}"-fcuda-is-device"{{.*}}
+// DEFAULT-NOT: "-std="{{.*}}
+// DEFAULT: "-cc1"{{.*}}
+// DEFAULT-NOT: "-std="{{.*}}
 
 // RUN: %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \
 // RUN:   -std=c++17 %s 2>&1 | FileCheck -check-prefixes=SPECIFIED %s
@@ -13,8 +15,10 @@
 
 // RUN: %clang -### --target=x86_64-pc-windows-msvc -offload-arch=gfx906 %s \
 // RUN:   2>&1 | FileCheck -check-prefixes=MSVC-DEF %s
-// MSVC-DEF: "-cc1"{{.*}}"-fcuda-is-device"{{.*}}"-std=c++14"
-// MSVC-DEF: "-cc1"{{.*}}"-std=c++14"
+// MSVC-DEF: "-cc1"{{.*}}"-fcuda-is-device"{{.*}}
+// MSVC-DEF-NOT: "-std="{{.*}}
+// MSVC-DEF: "-cc1"{{.*}}
+// MSVC-DEF-NOT: "-std="{{.*}}
 
 // RUN: %clang -### --target=x86_64-pc-windows-msvc -offload-arch=gfx906 %s \
 // RUN:   -std=c++17 %s 2>&1 | FileCheck -check-prefixes=MSVC-SPEC %s
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -5882,11 +5882,6 @@
 
     Args.AddLastArg(CmdArgs, options::OPT_ftrigraphs,
                     options::OPT_fno_trigraphs);
-
-    // HIP headers has minimum C++ standard requirements. Therefore set the
-    // default language standard.
-    if (IsHIP)
-      CmdArgs.push_back(IsWindowsMSVC ? "-std=c++14" : "-std=c++11");
   }
 
   // GCC's behavior for -Wwrite-strings is a bit strange:
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to