[cfe-commits] r85565 - in /cfe/trunk/lib/CodeGen: CGRtti.cpp Mangle.cpp Mangle.h
Anders Carlsson
andersca at mac.com
Thu Oct 29 18:52:02 PDT 2009
Author: andersca
Date: Thu Oct 29 20:52:02 2009
New Revision: 85565
URL: http://llvm.org/viewvc/llvm-project?rev=85565&view=rev
Log:
Fix thinko, mangleCXXRtti should obviously take a QualType!
Modified:
cfe/trunk/lib/CodeGen/CGRtti.cpp
cfe/trunk/lib/CodeGen/Mangle.cpp
cfe/trunk/lib/CodeGen/Mangle.h
Modified: cfe/trunk/lib/CodeGen/CGRtti.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRtti.cpp?rev=85565&r1=85564&r2=85565&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGRtti.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRtti.cpp Thu Oct 29 20:52:02 2009
@@ -23,8 +23,7 @@
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;
Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=85565&r1=85564&r2=85565&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Thu Oct 29 20:52:02 2009
@@ -53,7 +53,7 @@
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 @@
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 @@
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);
Modified: cfe/trunk/lib/CodeGen/Mangle.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.h?rev=85565&r1=85564&r2=85565&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.h (original)
+++ cfe/trunk/lib/CodeGen/Mangle.h Thu Oct 29 20:52:02 2009
@@ -67,7 +67,7 @@
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);
More information about the cfe-commits
mailing list