aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-22 02:03:18 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-22 02:03:18 +0000
commitc27a50855925ba7455c4049398c80db45fcef36a (patch)
treedbc8f37bb5869bf3fb46cd4c164f34aabd726640 /include/llvm/Analysis
parent4f912e5070e7e43b4bd9def2d9f1038254c5806c (diff)
downloadexternal_llvm-c27a50855925ba7455c4049398c80db45fcef36a.zip
external_llvm-c27a50855925ba7455c4049398c80db45fcef36a.tar.gz
external_llvm-c27a50855925ba7455c4049398c80db45fcef36a.tar.bz2
Switch DIDescriptor to use a TrackingVH. - This makes it much safer to work with debug info, since it was extraordinarily easy to have dangling pointers thanks to MDNode uniquing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r--include/llvm/Analysis/DebugInfo.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h
index f211be2..35f6787 100644
--- a/include/llvm/Analysis/DebugInfo.h
+++ b/include/llvm/Analysis/DebugInfo.h
@@ -24,6 +24,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Support/Dwarf.h"
+#include "llvm/Support/ValueHandle.h"
namespace llvm {
class BasicBlock;
@@ -45,7 +46,7 @@ namespace llvm {
class DIDescriptor {
protected:
- MDNode *DbgNode;
+ TrackingVH<MDNode> DbgNode;
/// DIDescriptor constructor. If the specified node is non-null, check
/// to make sure that the tag in the descriptor matches 'RequiredTag'. If