summaryrefslogtreecommitdiff
path: root/include
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
commit48a097bfb6b2ab1ed67d2341a5b51c5d2b61af5b (patch)
treedbc8f37bb5869bf3fb46cd4c164f34aabd726640 /include
parente5b18362dbafc8ee44ae864664fffe47066f685a (diff)
downloadllvm-48a097bfb6b2ab1ed67d2341a5b51c5d2b61af5b.tar.gz
llvm-48a097bfb6b2ab1ed67d2341a5b51c5d2b61af5b.tar.bz2
llvm-48a097bfb6b2ab1ed67d2341a5b51c5d2b61af5b.tar.xz
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')
-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 f211be2d49..35f6787f02 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