diff options
author | Andrey Bokhanko <andreybokhanko@gmail.com> | 2016-05-26 10:06:01 +0000 |
---|---|---|
committer | Andrey Bokhanko <andreybokhanko@gmail.com> | 2016-05-26 10:06:01 +0000 |
commit | 67a4186ee688c4fe013a45af83abaf6ba5172419 (patch) | |
tree | be2437143a99bf8eb0cebd39506ac0655c9a39b8 /clang/lib/AST/MicrosoftMangle.cpp | |
parent | 57446efaa9d27a91d282c8d72d4d6abe54685d89 (diff) | |
download | bcm5719-llvm-67a4186ee688c4fe013a45af83abaf6ba5172419.tar.gz bcm5719-llvm-67a4186ee688c4fe013a45af83abaf6ba5172419.zip |
[MSVC] Support for __unaligned qualifier in functions
This implements support for MS-specific __unaligned qualifier in functions and
makes the following test case both compile and mangle correctly:
struct S {
void f() __unaligned;
};
void S::f() __unaligned {
}
Differential Revision: http://reviews.llvm.org/D20437
llvm-svn: 270834
Diffstat (limited to 'clang/lib/AST/MicrosoftMangle.cpp')
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index a88e2a621ce..b93156cabae 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -1447,7 +1447,8 @@ void MicrosoftCXXNameMangler::manglePointerExtQualifiers(Qualifiers Quals, if (HasRestrict) Out << 'I'; - if (!PointeeType.isNull() && PointeeType.getLocalQualifiers().hasUnaligned()) + if (Quals.hasUnaligned() || + (!PointeeType.isNull() && PointeeType.getLocalQualifiers().hasUnaligned())) Out << 'F'; } @@ -1822,7 +1823,7 @@ void MicrosoftCXXNameMangler::mangleFunctionType(const FunctionType *T, // If this is a C++ instance method, mangle the CVR qualifiers for the // this pointer. if (HasThisQuals) { - Qualifiers Quals = Qualifiers::fromCVRMask(Proto->getTypeQuals()); + Qualifiers Quals = Qualifiers::fromCVRUMask(Proto->getTypeQuals()); manglePointerExtQualifiers(Quals, /*PointeeType=*/QualType()); mangleRefQualifier(Proto->getRefQualifier()); mangleQualifiers(Quals, /*IsMember=*/false); |