diff options
author | Erich Keane <erich.keane@intel.com> | 2018-07-13 19:46:04 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2018-07-13 19:46:04 +0000 |
commit | 12e2fde436d38782477f681dbf3fc83b8095e188 (patch) | |
tree | 86442dc143d91a91cbeaddee88bbe3fa6a8c0bc5 /lib/AST/MicrosoftMangle.cpp | |
parent | d119a80874f84aed19417020a5ab04d4568f1743 (diff) | |
download | clang-12e2fde436d38782477f681dbf3fc83b8095e188.tar.gz |
PR15730/PR16986 Allow dependently typed vector_size types.
As listed in the above PRs, vector_size doesn't allow
dependent types/values. This patch introduces a new
DependentVectorType to handle a VectorType that has a dependent
size or type.
In the future, ALL the vector-types should be able to create one
of these to handle dependent types/sizes as well. For example,
DependentSizedExtVectorType could likely be switched to just use
this instead, though that is left as an exercise for the future.
Differential Revision: https://reviews.llvm.org/D49045
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337036 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/MicrosoftMangle.cpp')
-rw-r--r-- | lib/AST/MicrosoftMangle.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp index 32c26270ec..f9cd24ce9a 100644 --- a/lib/AST/MicrosoftMangle.cpp +++ b/lib/AST/MicrosoftMangle.cpp @@ -2514,6 +2514,16 @@ void MicrosoftCXXNameMangler::mangleType(const ExtVectorType *T, Qualifiers Quals, SourceRange Range) { mangleType(static_cast<const VectorType *>(T), Quals, Range); } + +void MicrosoftCXXNameMangler::mangleType(const DependentVectorType *T, + Qualifiers, SourceRange Range) { + DiagnosticsEngine &Diags = Context.getDiags(); + unsigned DiagID = Diags.getCustomDiagID( + DiagnosticsEngine::Error, + "cannot mangle this dependent-sized vector type yet"); + Diags.Report(Range.getBegin(), DiagID) << Range; +} + void MicrosoftCXXNameMangler::mangleType(const DependentSizedExtVectorType *T, Qualifiers, SourceRange Range) { DiagnosticsEngine &Diags = Context.getDiags(); |