diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-05-14 00:35:19 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-05-14 00:35:19 +0000 |
commit | 17a692e7f196c15118e69d7012d110aa00a362ba (patch) | |
tree | 405967bae2f84ccb6e3eb57f8d1f4291b2ed23db /lib | |
parent | 123f18bcb9baeb6dc177cb642126a3a4d9ca8b43 (diff) |
Assert that DIEEntries are constructed with non-null DIEs
This just brings a crash a little further forward from DWARF emission to
DIE construction to make errors easier to diagnose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DIE.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DIE.h b/lib/CodeGen/AsmPrinter/DIE.h index 3c06001686..d8fa1f5a0e 100644 --- a/lib/CodeGen/AsmPrinter/DIE.h +++ b/lib/CodeGen/AsmPrinter/DIE.h @@ -325,7 +325,9 @@ namespace llvm { class DIEEntry : public DIEValue { DIE *const Entry; public: - explicit DIEEntry(DIE *E) : DIEValue(isEntry), Entry(E) {} + explicit DIEEntry(DIE *E) : DIEValue(isEntry), Entry(E) { + assert(E && "Cannot construct a DIEEntry with a null DIE"); + } DIE *getEntry() const { return Entry; } |