aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/Mangle.cpp
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-07-31 23:15:31 +0000
committerMike Stump <mrs@apple.com>2009-07-31 23:15:31 +0000
commit738f8c278da5950d0d4607de2debe0bdfad64185 (patch)
treeefb0b5505a9197e7dda5b00a89e82e8c931b91aa /lib/CodeGen/Mangle.cpp
parent12905987c4ab9fb705f88f56b35298f730c8dbd5 (diff)
Add beginnigs of rtti generation, wire up more of -fno-exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Mangle.cpp')
-rw-r--r--lib/CodeGen/Mangle.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp
index 36ee2a4222..341e230e90 100644
--- a/lib/CodeGen/Mangle.cpp
+++ b/lib/CodeGen/Mangle.cpp
@@ -42,6 +42,7 @@ namespace {
void mangleGuardVariable(const VarDecl *D);
void mangleCXXVtable(QualType Type);
+ void mangleCXXRtti(QualType Type);
void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type);
void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type);
@@ -165,6 +166,12 @@ void CXXNameMangler::mangleCXXVtable(QualType T) {
mangleType(T);
}
+void CXXNameMangler::mangleCXXRtti(QualType T) {
+ // <special-name> ::= TI <type> # typeinfo structure
+ Out << "_ZTI";
+ mangleType(T);
+}
+
void CXXNameMangler::mangleGuardVariable(const VarDecl *D)
{
// <special-name> ::= GV <object name> # Guard variable for one-time
@@ -822,4 +829,12 @@ namespace clang {
os.flush();
}
+
+ void mangleCXXRtti(QualType Type, ASTContext &Context,
+ llvm::raw_ostream &os) {
+ CXXNameMangler Mangler(Context, os);
+ Mangler.mangleCXXRtti(Type);
+
+ os.flush();
+ }
}