diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2014-05-01 17:50:17 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2014-05-01 17:50:17 +0000 |
| commit | 781a1d06be959c6d64f33ff12f047cf4d13cb148 (patch) | |
| tree | b3a5ed4a0ce973eeef20270380513a9cb06a9a62 /lib/CodeGen/CodeGenModule.cpp | |
| parent | f138d3564a1912cbc6a5f8433f521bb4922892cb (diff) | |
| download | clang-781a1d06be959c6d64f33ff12f047cf4d13cb148.tar.gz clang-781a1d06be959c6d64f33ff12f047cf4d13cb148.tar.bz2 clang-781a1d06be959c6d64f33ff12f047cf4d13cb148.tar.xz | |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 6103933300..ac97bdac60 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/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; |
