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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user