[PATCH] MS ABI: Mangle member pointer template arguments

Reid Kleckner rnk at google.com
Tue Feb 4 14:48:01 PST 2014


Hi majnemer, rsmith,

In essence, member pointers are mangled as they would be represented at
runtime.  They can be a single integer literal, single decl, or a tuple
with some more numbers tossed in.  With Clang today, most of those
numbers will be zero because we reject pointers to members of virtual
bases.

This change required moving VTableContextBase ownership from
CodeGenVTables to ASTContext, because mangling now depends on vtable
layout.

I also hoisted the inheritance model helpers up to be inline static
methods of MSInheritanceAttr.  This makes the AST code that deals with
member pointers much more readable.

http://llvm-reviews.chandlerc.com/D2695

Files:
  include/clang/AST/ASTContext.h
  include/clang/AST/Mangle.h
  include/clang/Basic/Attr.td
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/AST/ASTContext.cpp
  lib/AST/MicrosoftCXXABI.cpp
  lib/AST/MicrosoftMangle.cpp
  lib/CodeGen/CGCXXABI.h
  lib/CodeGen/CGVTables.cpp
  lib/CodeGen/CGVTables.h
  lib/CodeGen/ItaniumCXXABI.cpp
  lib/CodeGen/MicrosoftCXXABI.cpp
  lib/Sema/SemaTemplate.cpp
  test/CodeGenCXX/mangle-ms-templates-memptrs.cpp
  test/SemaCXX/cxx98-compat.cpp
  test/SemaCXX/nullptr.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2695.1.patch
Type: text/x-patch
Size: 38865 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140204/b5da3a62/attachment.bin>


More information about the cfe-commits mailing list