aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-11-20 06:46:42 +0000
committerBill Wendling <isanbard@gmail.com>2013-11-20 06:46:42 +0000
commit7b0fe5d62cc31a61188a20b243794b800baa3e7e (patch)
tree9205fcf4f524773ddbae6f795a42f104342b34ab /include/clang/AST
parent579d45ff5f92c4f5e31213e31490acdc5bcc5567 (diff)
downloadclang-7b0fe5d62cc31a61188a20b243794b800baa3e7e.tar.gz
Merging r195168:
------------------------------------------------------------------------ r195168 | rnk | 2013-11-19 15:23:00 -0800 (Tue, 19 Nov 2013) | 17 lines Add a mangler entry point for TBAA rather than using RTTI directly Summary: RTTI is not yet implemented for the Microsoft C++ ABI and isn't expected soon. We could easily add the mangling, but the error is what prevents us from silently miscompiling code that expects RTTI. Instead, add a new mangleTypeName entry point that simply forwards to mangleName or mangleType to produce a string that isn't part of the ABI. Itanium can continue to use RTTI names to avoid unecessary test breakage. This also seems like the right design. The fact that TBAA names happen to be RTTI names is now an implementation detail of the mangler, rather than part of TBAA. Differential Revision: http://llvm-reviews.chandlerc.com/D2153 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST')
-rw-r--r--include/clang/AST/Mangle.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/AST/Mangle.h b/include/clang/AST/Mangle.h
index e875c31fc0..4df2955aec 100644
--- a/include/clang/AST/Mangle.h
+++ b/include/clang/AST/Mangle.h
@@ -148,6 +148,12 @@ public:
virtual void mangleDynamicAtExitDestructor(const VarDecl *D,
raw_ostream &) = 0;
+ /// Generates a unique string for an externally visible type for use with TBAA
+ /// or type uniquing.
+ /// TODO: Extend this to internal types by generating names that are unique
+ /// across translation units so it can be used with LTO.
+ virtual void mangleTypeName(QualType T, raw_ostream &) = 0;
+
/// @}
};