summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-05-01 17:50:17 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-05-01 17:50:17 +0000
commitdaff37013c0019afca0ee052a86b03785e2cd2de (patch)
tree099cd132386b04750fe8adf75e6abbc4889ccc11 /clang/lib/CodeGen
parent0db806b7f942b8ab5495fc31cf672975642ebb10 (diff)
downloadbcm5719-llvm-daff37013c0019afca0ee052a86b03785e2cd2de.tar.gz
bcm5719-llvm-daff37013c0019afca0ee052a86b03785e2cd2de.zip
AST: Mangle reference temporaries reliably
Summary: Previously, we would generate a single name for all reference temporaries and allow LLVM to rename them for us. Instead, number the reference temporaries as we build them in Sema. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3554 llvm-svn: 207776
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 61039333008..ac97bdac601 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -2828,7 +2828,8 @@ llvm::Constant *CodeGenModule::GetAddrOfGlobalTemporary(
// we also need to make the temporaries externally-visible).
SmallString<256> Name;
llvm::raw_svector_ostream Out(Name);
- getCXXABI().getMangleContext().mangleReferenceTemporary(VD, Out);
+ getCXXABI().getMangleContext().mangleReferenceTemporary(
+ VD, E->getManglingNumber(), Out);
Out.flush();
APValue *Value = 0;
OpenPOWER on IntegriCloud