Skip to content

Commit 05ae166

Browse files
author
git apple-llvm automerger
committed
Merge commit 'cc0cf7253967' from llvm.org/main into next
2 parents ebd01be + cc0cf72 commit 05ae166

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

clang/lib/Driver/Driver.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -3003,6 +3003,8 @@ void Driver::BuildInputs(const ToolChain &TC, DerivedArgList &Args,
30033003
Ty = types::TY_CXX;
30043004
else if (CCCIsCPP() || CCGenDiagnostics)
30053005
Ty = types::TY_C;
3006+
else if (IsDXCMode())
3007+
Ty = types::TY_HLSL;
30063008
else
30073009
Ty = types::TY_Object;
30083010
}

clang/test/Driver/dxc_I.test

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// RUN: %clang_dxc -Tlib_6_3 -### %s 2>&1 | FileCheck %s
2+
3+
// Make sure a non `.hlsl` file is considered an HLSL source file in dxc mode.
4+
// CHECK: "-x" "hlsl" "{{.*}}dxc_I.test"

0 commit comments

Comments
 (0)