This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0d459b71dc28: [Driver][DXC] Treat stdin as HLSL (authored by bogner).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157562/new/ https://reviews.llvm.org/D157562 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/dxc_stdin.hlsl Index: clang/test/Driver/dxc_stdin.hlsl =================================================================== --- /dev/null +++ clang/test/Driver/dxc_stdin.hlsl @@ -0,0 +1,3 @@ +// RUN: %clang_dxc -Tlib_6_7 - -### 2>&1 | FileCheck %s +// CHECK: "-cc1" +// CHECK-SAME: "-x" "hlsl" "-" Index: clang/lib/Driver/Driver.cpp =================================================================== --- clang/lib/Driver/Driver.cpp +++ clang/lib/Driver/Driver.cpp @@ -2648,6 +2648,8 @@ if (memcmp(Value, "-", 2) == 0) { if (IsFlangMode()) { Ty = types::TY_Fortran; + } else if (IsDXCMode()) { + Ty = types::TY_HLSL; } else { // If running with -E, treat as a C input (this changes the // builtin macros, for example). This may be overridden by -ObjC
Index: clang/test/Driver/dxc_stdin.hlsl =================================================================== --- /dev/null +++ clang/test/Driver/dxc_stdin.hlsl @@ -0,0 +1,3 @@ +// RUN: %clang_dxc -Tlib_6_7 - -### 2>&1 | FileCheck %s +// CHECK: "-cc1" +// CHECK-SAME: "-x" "hlsl" "-" Index: clang/lib/Driver/Driver.cpp =================================================================== --- clang/lib/Driver/Driver.cpp +++ clang/lib/Driver/Driver.cpp @@ -2648,6 +2648,8 @@ if (memcmp(Value, "-", 2) == 0) { if (IsFlangMode()) { Ty = types::TY_Fortran; + } else if (IsDXCMode()) { + Ty = types::TY_HLSL; } else { // If running with -E, treat as a C input (this changes the // builtin macros, for example). This may be overridden by -ObjC
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits