From c27a50855925ba7455c4049398c80db45fcef36a Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 22 Sep 2009 02:03:18 +0000 Subject: 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 --- include/llvm/Analysis/DebugInfo.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/llvm/Analysis') 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 DbgNode; /// DIDescriptor constructor. If the specified node is non-null, check /// to make sure that the tag in the descriptor matches 'RequiredTag'. If -- cgit v1.1