summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-02-11 02:52:17 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-02-11 02:52:17 +0000
commitf0be979bddb8baa28e77693a3dc931e487b2a9f2 (patch)
treeb7574e1d1590c58d1ca8c7c20b4cf3d0f3b65e06 /lib/CodeGen/CGExpr.cpp
parentec2990351335f163601b98e39b52425e2e9f931e (diff)
downloadclang-f0be979bddb8baa28e77693a3dc931e487b2a9f2.tar.gz
clang-f0be979bddb8baa28e77693a3dc931e487b2a9f2.tar.bz2
clang-f0be979bddb8baa28e77693a3dc931e487b2a9f2.tar.xz
For consistency, use llvm::raw_ostream in the rest of the mangle api.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125360 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 019a6c524d..e8ac813870 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -178,8 +178,10 @@ CreateReferenceTemporary(CodeGenFunction& CGF, QualType Type,
if (const VarDecl *VD = dyn_cast_or_null<VarDecl>(InitializedDecl)) {
if (VD->hasGlobalStorage()) {
llvm::SmallString<256> Name;
- CGF.CGM.getCXXABI().getMangleContext().mangleReferenceTemporary(VD, Name);
-
+ llvm::raw_svector_ostream Out(Name);
+ CGF.CGM.getCXXABI().getMangleContext().mangleReferenceTemporary(VD, Out);
+ Out.flush();
+
const llvm::Type *RefTempTy = CGF.ConvertTypeForMem(Type);
// Create the reference temporary.