[cfe-commits] r88726 - in /cfe/trunk/lib/CodeGen: Mangle.cpp Mangle.h
Mike Stump
mrs at apple.com
Fri Nov 13 16:14:13 PST 2009
Author: mrs
Date: Fri Nov 13 18:14:13 2009
New Revision: 88726
URL: http://llvm.org/viewvc/llvm-project?rev=88726&view=rev
Log:
Mangling support for typeinfo names.
Modified:
cfe/trunk/lib/CodeGen/Mangle.cpp
cfe/trunk/lib/CodeGen/Mangle.h
Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=88726&r1=88725&r2=88726&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Fri Nov 13 18:14:13 2009
@@ -56,6 +56,7 @@
void mangleCXXCtorVtable(const CXXRecordDecl *RD, int64_t Offset,
const CXXRecordDecl *Type);
void mangleCXXRtti(QualType Ty);
+ void mangleCXXRttiName(QualType Ty);
void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type);
void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type);
@@ -236,6 +237,13 @@
mangleType(Ty);
}
+void CXXNameMangler::mangleCXXRttiName(QualType Ty) {
+ // <special-name> ::= TS <type> # typeinfo name (null terminated byte string)
+ Out << "_ZTS";
+
+ mangleType(Ty);
+}
+
void CXXNameMangler::mangleGuardVariable(const VarDecl *D) {
// <special-name> ::= GV <object name> # Guard variable for one-time
// # initialization
@@ -1480,4 +1488,12 @@
os.flush();
}
+
+ void mangleCXXRttiName(MangleContext &Context, QualType Ty,
+ llvm::raw_ostream &os) {
+ CXXNameMangler Mangler(Context, os);
+ Mangler.mangleCXXRttiName(Ty);
+
+ os.flush();
+ }
}
Modified: cfe/trunk/lib/CodeGen/Mangle.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.h?rev=88726&r1=88725&r2=88726&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.h (original)
+++ cfe/trunk/lib/CodeGen/Mangle.h Fri Nov 13 18:14:13 2009
@@ -72,6 +72,8 @@
llvm::raw_ostream &os);
void mangleCXXRtti(MangleContext &Context, QualType T,
llvm::raw_ostream &os);
+ void mangleCXXRttiName(MangleContext &Context, QualType T,
+ llvm::raw_ostream &os);
void mangleCXXCtor(MangleContext &Context, const CXXConstructorDecl *D,
CXXCtorType Type, llvm::raw_ostream &os);
void mangleCXXDtor(MangleContext &Context, const CXXDestructorDecl *D,
More information about the cfe-commits
mailing list