diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-21 09:06:22 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-21 09:06:22 +0000 |
commit | 94fd26de3ae77f29496ca22d5276b2fb71b2311d (patch) | |
tree | 4495fec430a59d52f8583796d3714810edd4ee1e /lib/CodeGen/CGVtable.cpp | |
parent | 1b0771170921b9e752a50ea2cf87814bff92c834 (diff) |
IRgen: Switch the C++ mangler interfaces to take the SmallVector to write into,
instead of requiring clients to make a raw_svector_ostream, which is just an
implementation detail.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89548 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r-- | lib/CodeGen/CGVtable.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index d99a426aee..f68dbe910f 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -791,12 +791,11 @@ llvm::Constant *CodeGenModule::GenerateVtable(const CXXRecordDecl *LayoutClass, const CXXRecordDecl *RD, uint64_t Offset) { llvm::SmallString<256> OutName; - llvm::raw_svector_ostream Out(OutName); if (LayoutClass != RD) - getMangleContext().mangleCXXCtorVtable(LayoutClass, Offset/8, RD, Out); + getMangleContext().mangleCXXCtorVtable(LayoutClass, Offset/8, RD, OutName); else - getMangleContext().mangleCXXVtable(RD, Out); - llvm::StringRef Name = Out.str(); + getMangleContext().mangleCXXVtable(RD, OutName); + llvm::StringRef Name = OutName.str(); std::vector<llvm::Constant *> methods; llvm::Type *Ptr8Ty=llvm::PointerType::get(llvm::Type::getInt8Ty(VMContext),0); @@ -1042,9 +1041,8 @@ llvm::Constant *CodeGenModule::GenerateVTT(const CXXRecordDecl *RD) { return 0; llvm::SmallString<256> OutName; - llvm::raw_svector_ostream Out(OutName); - getMangleContext().mangleCXXVTT(RD, Out); - llvm::StringRef Name = Out.str(); + getMangleContext().mangleCXXVTT(RD, OutName); + llvm::StringRef Name = OutName.str(); llvm::GlobalVariable::LinkageTypes linktype; linktype = llvm::GlobalValue::LinkOnceODRLinkage; |