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 | 3fad2414b036a7803c98c7124343bad6013e178f (patch) | |
tree | 8d61daf2f835ffe67449ea36b30bcdc8a9cb3ee4 /lib/Sema/SemaAttr.cpp | |
parent | 4809f9bcd2f9b1473fa0d8b1db56cc6887ff814c (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201105 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaAttr.cpp')
-rw-r--r-- | lib/Sema/SemaAttr.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Sema/SemaAttr.cpp b/lib/Sema/SemaAttr.cpp index 499f958744..9f0eb91d2e 100644 --- a/lib/Sema/SemaAttr.cpp +++ b/lib/Sema/SemaAttr.cpp @@ -287,6 +287,13 @@ void Sema::ActOnPragmaDetectMismatch(StringRef Name, StringRef Value) { Consumer.HandleDetectMismatch(Name, Value); } +void Sema::ActOnPragmaMSPointersToMembers( + PragmaMSPointersToMembersKind RepresentationMethod, + SourceLocation PragmaLoc) { + MSPointerToMemberRepresentationMethod = RepresentationMethod; + ImplicitMSInheritanceAttrLoc = PragmaLoc; +} + void Sema::ActOnPragmaUnused(const Token &IdTok, Scope *curScope, SourceLocation PragmaLoc) { |