Skip to content

Commit ae1a58b

Browse files
author
Greg Roth
committed
Enable matrices when HLSL is enabled
1 parent 3f53681 commit ae1a58b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4334,7 +4334,7 @@ defm ptrauth_init_fini_address_discrimination : OptInCC1FFlag<"ptrauth-init-fini
43344334
def fenable_matrix : Flag<["-"], "fenable-matrix">, Group<f_Group>,
43354335
Visibility<[ClangOption, CC1Option]>,
43364336
HelpText<"Enable matrix data type and related builtin functions">,
4337-
MarshallingInfoFlag<LangOpts<"MatrixTypes">>;
4337+
MarshallingInfoFlag<LangOpts<"MatrixTypes">, hlsl.KeyPath>;
43384338

43394339
defm raw_string_literals : BoolFOption<"raw-string-literals",
43404340
LangOpts<"RawStringLiterals">, Default<std#".hasRawStringLiterals()">,

clang/lib/AST/ASTContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target,
13811381
if (LangOpts.OpenACC && !LangOpts.OpenMP) {
13821382
InitBuiltinType(ArraySectionTy, BuiltinType::ArraySection);
13831383
}
1384-
if (LangOpts.MatrixTypes || LangOpts.HLSL)
1384+
if (LangOpts.MatrixTypes)
13851385
InitBuiltinType(IncompleteMatrixIdxTy, BuiltinType::IncompleteMatrixIdx);
13861386

13871387
// Builtin types for 'id', 'Class', and 'SEL'.

clang/lib/Sema/SemaType.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2447,7 +2447,7 @@ QualType Sema::BuildExtVectorType(QualType T, Expr *ArraySize,
24472447

24482448
QualType Sema::BuildMatrixType(QualType ElementTy, Expr *NumRows, Expr *NumCols,
24492449
SourceLocation AttrLoc) {
2450-
assert((getLangOpts().MatrixTypes || getLangOpts().HLSL) &&
2450+
assert(getLangOpts().MatrixTypes &&
24512451
"Should never build a matrix type when it is disabled");
24522452

24532453
// Check element type, if it is not dependent.

0 commit comments

Comments
 (0)