diff options
author | Anders Carlsson <andersca@mac.com> | 2009-10-30 01:52:02 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-10-30 01:52:02 +0000 |
commit | 958c9f8524963fcee47e5cc8a4393ea59b5f5955 (patch) | |
tree | aa2403e5ee4778f8861224a8a625285d410cdf05 /clang/lib/CodeGen | |
parent | 4246f00e0cc99d30e6699c1d7368034ce7125e6e (diff) | |
download | bcm5719-llvm-958c9f8524963fcee47e5cc8a4393ea59b5f5955.tar.gz bcm5719-llvm-958c9f8524963fcee47e5cc8a4393ea59b5f5955.zip |
Fix thinko, mangleCXXRtti should obviously take a QualType!
llvm-svn: 85565
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGRtti.cpp | 3 | ||||
-rw-r--r-- | clang/lib/CodeGen/Mangle.cpp | 9 | ||||
-rw-r--r-- | clang/lib/CodeGen/Mangle.h | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGRtti.cpp b/clang/lib/CodeGen/CGRtti.cpp index 8351db552a2..7af15f0a8ca 100644 --- a/clang/lib/CodeGen/CGRtti.cpp +++ b/clang/lib/CodeGen/CGRtti.cpp @@ -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; diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp index ff8cc2b044d..a5b34527969 100644 --- a/clang/lib/CodeGen/Mangle.cpp +++ b/clang/lib/CodeGen/Mangle.cpp @@ -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); diff --git a/clang/lib/CodeGen/Mangle.h b/clang/lib/CodeGen/Mangle.h index 0d70948b9d2..7f46a106f32 100644 --- a/clang/lib/CodeGen/Mangle.h +++ b/clang/lib/CodeGen/Mangle.h @@ -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); |