Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion clang/lib/AST/MicrosoftMangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3526,7 +3526,22 @@ void MicrosoftCXXNameMangler::mangleType(const DependentSizedExtVectorType *T,

void MicrosoftCXXNameMangler::mangleType(const ConstantMatrixType *T,
Qualifiers quals, SourceRange Range) {
Error(Range.getBegin(), "matrix type") << Range;
QualType EltTy = T->getElementType();
const BuiltinType *ET = EltTy->getAs<BuiltinType>();

llvm::SmallString<64> TemplateMangling;
llvm::raw_svector_ostream Stream(TemplateMangling);
MicrosoftCXXNameMangler Extra(Context, Stream);

Stream << "?$";

Extra.mangleSourceName("__matrix");
Extra.mangleType(EltTy, Range, QMM_Escape);

Extra.mangleIntegerLiteral(llvm::APSInt::getUnsigned(T->getNumRows()));
Extra.mangleIntegerLiteral(llvm::APSInt::getUnsigned(T->getNumColumns()));

mangleArtificialTagType(TagTypeKind::Struct, TemplateMangling, {"__clang"});
}

void MicrosoftCXXNameMangler::mangleType(const DependentSizedMatrixType *T,
Expand Down