diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-02-10 19:50:15 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-02-10 19:50:15 +0000 |
commit | 4bb0980d96281e62870a2631b4acaf2e44b306dd (patch) | |
tree | b6c40095531c39b23d96b4cdabe089c2925bb878 /clang/lib/Sema/SemaDecl.cpp | |
parent | 756c22cdedd122d2a53b5219a6bce9295d08ca18 (diff) | |
download | bcm5719-llvm-4bb0980d96281e62870a2631b4acaf2e44b306dd.tar.gz bcm5719-llvm-4bb0980d96281e62870a2631b4acaf2e44b306dd.zip |
MS ABI: Add support for #pragma pointers_to_members
Introduce a notion of a 'current representation method' for
pointers-to-members.
When starting out, this is set to 'best case' (representation method is
chosen by examining the class, selecting the smallest representation
that would work given the class definition or lack thereof).
This pragma allows the translation unit to dictate exactly what
representation to use, similar to how the inheritance model keywords
operate.
N.B. PCH support is forthcoming.
Differential Revision: http://llvm-reviews.chandlerc.com/D2723
llvm-svn: 201105
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index b42b502b097..17e0f38e07d 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -1963,7 +1963,8 @@ static bool mergeDeclAttribute(Sema &S, NamedDecl *D, InheritableAttr *Attr, NewAttr = S.mergeSectionAttr(D, SA->getRange(), SA->getName(), AttrSpellingListIndex); else if (MSInheritanceAttr *IA = dyn_cast<MSInheritanceAttr>(Attr)) - NewAttr = S.mergeMSInheritanceAttr(D, IA->getRange(), AttrSpellingListIndex, + NewAttr = S.mergeMSInheritanceAttr(D, IA->getRange(), IA->getBestCase(), + AttrSpellingListIndex, IA->getSemanticSpelling()); else if (isa<AlignedAttr>(Attr)) // AlignedAttrs are handled separately, because we need to handle all @@ -12152,7 +12153,7 @@ void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, if (const MSInheritanceAttr *IA = Record->getAttr<MSInheritanceAttr>()) checkMSInheritanceAttrOnDefinition(cast<CXXRecordDecl>(Record), - IA->getRange(), + IA->getRange(), IA->getBestCase(), IA->getSemanticSpelling()); } |