]> granicus.if.org Git - clang/commitdiff
Fix thinko, mangleCXXRtti should obviously take a QualType!
authorAnders Carlsson <andersca@mac.com>
Fri, 30 Oct 2009 01:52:02 +0000 (01:52 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 30 Oct 2009 01:52:02 +0000 (01:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85565 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGRtti.cpp
lib/CodeGen/Mangle.cpp
lib/CodeGen/Mangle.h

index 8351db552a27e823c7a45d2e64b6b9d9c8d1d4ea..7af15f0a8ca47393050ee9077b5b7aca902320e5 100644 (file)
@@ -23,8 +23,7 @@ llvm::Constant *CodeGenModule::GenerateRtti(const CXXRecordDecl *RD) {
 
   llvm::SmallString<256> OutName;
   llvm::raw_svector_ostream Out(OutName);
-  mangleCXXRtti(getMangleContext(), 
-                Context.getTagDeclType(RD).getTypePtr(), Out);
+  mangleCXXRtti(getMangleContext(), Context.getTagDeclType(RD), Out);
   
   llvm::GlobalVariable::LinkageTypes linktype;
   linktype = llvm::GlobalValue::WeakAnyLinkage;
index ff8cc2b044d3c69fd3e17535aabc917851624d73..a5b34527969b7f69f4f94bbd53bb7fb60f9f3a06 100644 (file)
@@ -53,7 +53,7 @@ namespace {
 
     void mangleCXXVtable(const CXXRecordDecl *RD);
     void mangleCXXVTT(const CXXRecordDecl *RD);
-    void mangleCXXRtti(const Type *Ty);
+    void mangleCXXRtti(QualType Ty);
     void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type);
     void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type);
 
@@ -212,12 +212,11 @@ void CXXNameMangler::mangleCXXVTT(const CXXRecordDecl *RD) {
   mangleName(RD);
 }
 
-void CXXNameMangler::mangleCXXRtti(const Type *Ty) {
+void CXXNameMangler::mangleCXXRtti(QualType Ty) {
   // <special-name> ::= TI <type>  # typeinfo structure
   Out << "_ZTI";
 
-  // FIXME: mangleType should probably take a const Type * instead.
-  mangleType(QualType(Ty, 0));
+  mangleType(Ty);
 }
 
 void CXXNameMangler::mangleGuardVariable(const VarDecl *D) {
@@ -1434,7 +1433,7 @@ namespace clang {
     os.flush();
   }
 
-  void mangleCXXRtti(MangleContext &Context, const Type *Ty,
+  void mangleCXXRtti(MangleContext &Context, QualType Ty,
                      llvm::raw_ostream &os) {
     CXXNameMangler Mangler(Context, os);
     Mangler.mangleCXXRtti(Ty);
index 0d70948b9d24caaf34da82748ee7c42f4c739423..7f46a106f32a3f49852b80a8e36b4803bfeb8159 100644 (file)
@@ -67,7 +67,7 @@ namespace clang {
                        llvm::raw_ostream &os);
   void mangleCXXVTT(MangleContext &Context, const CXXRecordDecl *RD,
                        llvm::raw_ostream &os);
-  void mangleCXXRtti(MangleContext &Context, const Type *T, 
+  void mangleCXXRtti(MangleContext &Context, QualType T, 
                      llvm::raw_ostream &os);
   void mangleCXXCtor(MangleContext &Context, const CXXConstructorDecl *D, 
                      CXXCtorType Type, llvm::raw_ostream &os);