diff options
| author | Devang Patel <dpatel@apple.com> | 2010-01-26 21:39:14 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2010-01-26 21:39:14 +0000 |
| commit | 1973df2e3fe7f73440d7024098244ff1bd32dc8c (patch) | |
| tree | 43ca37a481ec74258712ce0971814e0addeb649f /llvm | |
| parent | a04ecfb70139894aff6f4fa809c6305b5a6a304e (diff) | |
| download | bcm5719-llvm-1973df2e3fe7f73440d7024098244ff1bd32dc8c.tar.gz bcm5719-llvm-1973df2e3fe7f73440d7024098244ff1bd32dc8c.zip | |
Use AssertingVH, just to be paranoid.
llvm-svn: 94593
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 0bc7f328666..9747d3bd4ba 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -26,6 +26,7 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/ValueHandle.h" #include "llvm/Support/FormattedStream.h" #include "llvm/Support/Timer.h" #include "llvm/System/Path.h" @@ -166,7 +167,8 @@ public: class DbgScope { DbgScope *Parent; // Parent to this scope. DIDescriptor Desc; // Debug info descriptor for scope. - MDNode * InlinedAtLocation; // Location at which scope is inlined. + // Location at which this scope is inlined. + AssertingVH<MDNode> InlinedAtLocation; bool AbstractScope; // Abstract Scope unsigned StartLabelID; // Label ID of the beginning of scope. unsigned EndLabelID; // Label ID of the end of scope. @@ -189,7 +191,7 @@ public: void setParent(DbgScope *P) { Parent = P; } DIDescriptor getDesc() const { return Desc; } MDNode *getInlinedAt() const { - return dyn_cast_or_null<MDNode>(InlinedAtLocation); + return InlinedAtLocation; } MDNode *getScopeNode() const { return Desc.getNode(); } unsigned getStartLabelID() const { return StartLabelID; } |

