diff options
| author | David Blaikie <dblaikie@gmail.com> | 2014-05-06 03:42:01 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2014-05-06 03:42:01 +0000 |
| commit | 2115b66f4114258ad27b1abaef7e16676b119c91 (patch) | |
| tree | 050faab55d6c702de4bd13d8825149f9bc5d2680 /lib/Basic/FileSystemStatCache.cpp | |
| parent | 30dabc00de4fe230663702ebfbf415084075ba68 (diff) | |
| download | clang-2115b66f4114258ad27b1abaef7e16676b119c91.tar.gz clang-2115b66f4114258ad27b1abaef7e16676b119c91.tar.bz2 clang-2115b66f4114258ad27b1abaef7e16676b119c91.tar.xz | |
PR19598: Ensure temporary metadata nodes used in debug info are destroyed.
CGDebugInfo and DIBuilder were lax in their handling of temporary
MDNodes. All temporary nodes need to be deleted, which means they need
to be RAUW'd with a permanent node. This was not happening.
To ensure this, leverage DIBuilder's new ability to create both
permanent and temporary declarations. Ensure all temporary declarations
are RAUW'd, even with itself. (DIDescriptor::RAUW handles the case where
it is replaced with itself and creates a new, duplicate permanent node
to replace itself with)
This means that all temporary declarations must be added to the
ReplacementMap even if they're never upgraded to definitions - so move
the point of insertion into the map to the point of creation of the
declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/FileSystemStatCache.cpp')
0 files changed, 0 insertions, 0 deletions
