summaryrefslogtreecommitdiffstats
path: root/clang/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
commit183c3d2f5978422e8b632c5478331e7b39fe1efe (patch)
treea220c9d05cc9dfaf306decc849ef350f31bc6e2d /clang/lib/CodeGen/Mangle.cpp
parentce24e0043e7f4d140c51bb828065a4354af67fa5 (diff)
downloadbcm5719-llvm-183c3d2f5978422e8b632c5478331e7b39fe1efe.tar.gz
bcm5719-llvm-183c3d2f5978422e8b632c5478331e7b39fe1efe.zip
Add beginnigs of rtti generation, wire up more of -fno-exceptions.
llvm-svn: 77751
Diffstat (limited to 'clang/lib/CodeGen/Mangle.cpp')
-rw-r--r--clang/lib/CodeGen/Mangle.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp
index 36ee2a42222..341e230e904 100644
--- a/clang/lib/CodeGen/Mangle.cpp
+++ b/clang/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();
+ }
}
OpenPOWER on IntegriCloud