[cfe-commits] r83793 - in /cfe/trunk/lib/CodeGen: CGCXX.cpp CGRtti.cpp Mangle.cpp Mangle.h
Anders Carlsson
andersca at mac.com
Sun Oct 11 14:24:52 PDT 2009
Author: andersca
Date: Sun Oct 11 16:24:51 2009
New Revision: 83793
URL: http://llvm.org/viewvc/llvm-project?rev=83793&view=rev
Log:
Change mangleCXXVtable and mangleCXXRtti to take CXXRecordDecls instead of QualTypes.
Modified:
cfe/trunk/lib/CodeGen/CGCXX.cpp
cfe/trunk/lib/CodeGen/CGRtti.cpp
cfe/trunk/lib/CodeGen/Mangle.cpp
cfe/trunk/lib/CodeGen/Mangle.h
Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXX.cpp?rev=83793&r1=83792&r2=83793&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Sun Oct 11 16:24:51 2009
@@ -1154,8 +1154,7 @@
llvm::SmallString<256> OutName;
llvm::raw_svector_ostream Out(OutName);
QualType ClassTy;
- ClassTy = getContext().getTagDeclType(RD);
- mangleCXXVtable(CGM.getMangleContext(), ClassTy, Out);
+ mangleCXXVtable(CGM.getMangleContext(), RD, Out);
llvm::GlobalVariable::LinkageTypes linktype;
linktype = llvm::GlobalValue::WeakAnyLinkage;
std::vector<llvm::Constant *> methods;
Modified: cfe/trunk/lib/CodeGen/CGRtti.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRtti.cpp?rev=83793&r1=83792&r2=83793&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGRtti.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRtti.cpp Sun Oct 11 16:24:51 2009
@@ -25,9 +25,8 @@
llvm::SmallString<256> OutName;
llvm::raw_svector_ostream Out(OutName);
- QualType ClassTy;
- ClassTy = getContext().getTagDeclType(RD);
- mangleCXXRtti(getMangleContext(), ClassTy, Out);
+ mangleCXXRtti(getMangleContext(), RD, Out);
+
llvm::GlobalVariable::LinkageTypes linktype;
linktype = llvm::GlobalValue::WeakAnyLinkage;
std::vector<llvm::Constant *> info;
Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=83793&r1=83792&r2=83793&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Sun Oct 11 16:24:51 2009
@@ -51,8 +51,8 @@
int64_t nv_r, int64_t v_r);
void mangleGuardVariable(const VarDecl *D);
- void mangleCXXVtable(QualType Type);
- void mangleCXXRtti(QualType Type);
+ void mangleCXXVtable(const CXXRecordDecl *RD);
+ void mangleCXXRtti(const CXXRecordDecl *RD);
void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type);
void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type);
@@ -198,16 +198,16 @@
mangle(D);
}
-void CXXNameMangler::mangleCXXVtable(QualType T) {
+void CXXNameMangler::mangleCXXVtable(const CXXRecordDecl *RD) {
// <special-name> ::= TV <type> # virtual table
Out << "_ZTV";
- mangleType(T);
+ mangleName(RD);
}
-void CXXNameMangler::mangleCXXRtti(QualType T) {
+void CXXNameMangler::mangleCXXRtti(const CXXRecordDecl *RD) {
// <special-name> ::= TI <type> # typeinfo structure
Out << "_ZTI";
- mangleType(T);
+ mangleName(RD);
}
void CXXNameMangler::mangleGuardVariable(const VarDecl *D) {
@@ -1414,18 +1414,18 @@
os.flush();
}
- void mangleCXXVtable(MangleContext &Context, QualType Type,
+ void mangleCXXVtable(MangleContext &Context, const CXXRecordDecl *RD,
llvm::raw_ostream &os) {
CXXNameMangler Mangler(Context, os);
- Mangler.mangleCXXVtable(Type);
+ Mangler.mangleCXXVtable(RD);
os.flush();
}
- void mangleCXXRtti(MangleContext &Context, QualType Type,
+ void mangleCXXRtti(MangleContext &Context, const CXXRecordDecl *RD,
llvm::raw_ostream &os) {
CXXNameMangler Mangler(Context, os);
- Mangler.mangleCXXRtti(Type);
+ Mangler.mangleCXXRtti(RD);
os.flush();
}
Modified: cfe/trunk/lib/CodeGen/Mangle.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.h?rev=83793&r1=83792&r2=83793&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.h (original)
+++ cfe/trunk/lib/CodeGen/Mangle.h Sun Oct 11 16:24:51 2009
@@ -63,8 +63,10 @@
llvm::raw_ostream &os);
void mangleGuardVariable(MangleContext &Context, const VarDecl *D,
llvm::raw_ostream &os);
- void mangleCXXVtable(MangleContext &Context, QualType T, llvm::raw_ostream &os);
- void mangleCXXRtti(MangleContext &Context, QualType T, llvm::raw_ostream &os);
+ void mangleCXXVtable(MangleContext &Context, const CXXRecordDecl *RD,
+ llvm::raw_ostream &os);
+ void mangleCXXRtti(MangleContext &Context, const CXXRecordDecl *RD,
+ llvm::raw_ostream &os);
void mangleCXXCtor(MangleContext &Context, const CXXConstructorDecl *D,
CXXCtorType Type, llvm::raw_ostream &os);
void mangleCXXDtor(MangleContext &Context, const CXXDestructorDecl *D,
More information about the cfe-commits
mailing list