From 183c3d2f5978422e8b632c5478331e7b39fe1efe Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Fri, 31 Jul 2009 23:15:31 +0000 Subject: Add beginnigs of rtti generation, wire up more of -fno-exceptions. llvm-svn: 77751 --- clang/lib/CodeGen/Mangle.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'clang/lib/CodeGen/Mangle.cpp') 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) { + // ::= TI # typeinfo structure + Out << "_ZTI"; + mangleType(T); +} + void CXXNameMangler::mangleGuardVariable(const VarDecl *D) { // ::= GV # 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(); + } } -- cgit v1.2.3