summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/MicrosoftMangle.cpp
diff options
context:
space:
mode:
authorAndrey Bokhanko <andreybokhanko@gmail.com>2016-05-11 18:38:21 +0000
committerAndrey Bokhanko <andreybokhanko@gmail.com>2016-05-11 18:38:21 +0000
commit45d413260e82b57db8a3fc55bb2d90ce48ad0d45 (patch)
tree8d4f3f712258cdfa4468168e00eb111f6e6f8a31 /clang/lib/AST/MicrosoftMangle.cpp
parent5da4dab0fc6f387c02fcb062fb5feea3a6407e8e (diff)
downloadbcm5719-llvm-45d413260e82b57db8a3fc55bb2d90ce48ad0d45.tar.gz
bcm5719-llvm-45d413260e82b57db8a3fc55bb2d90ce48ad0d45.zip
[MSVC] Implementation of __unaligned as a proper type qualifier
This patch implements __unaligned (MS extension) as a proper type qualifier (before that, it was implemented as an ignored attribute). It also fixes PR27367 and PR27666. Differential Revision: http://reviews.llvm.org/D20103 llvm-svn: 269220
Diffstat (limited to 'clang/lib/AST/MicrosoftMangle.cpp')
-rw-r--r--clang/lib/AST/MicrosoftMangle.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp
index c9caddbb6fc..774dab05728 100644
--- a/clang/lib/AST/MicrosoftMangle.cpp
+++ b/clang/lib/AST/MicrosoftMangle.cpp
@@ -1446,6 +1446,9 @@ void MicrosoftCXXNameMangler::manglePointerExtQualifiers(Qualifiers Quals,
if (HasRestrict)
Out << 'I';
+
+ if (!PointeeType.isNull() && PointeeType.getLocalQualifiers().hasUnaligned())
+ Out << 'F';
}
void MicrosoftCXXNameMangler::manglePointerCVQualifiers(Qualifiers Quals) {
@@ -1577,6 +1580,8 @@ void MicrosoftCXXNameMangler::mangleType(QualType T, SourceRange Range,
}
break;
case QMM_Result:
+ // Presence of __unaligned qualifier shouldn't affect mangling here.
+ Quals.removeUnaligned();
if ((!IsPointer && Quals) || isa<TagType>(T)) {
Out << '?';
mangleQualifiers(Quals, false);
OpenPOWER on IntegriCloud