summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2018-01-05 23:01:04 +0000
committerAdrian McCarthy <amccarth@google.com>2018-01-05 23:01:04 +0000
commit74bfafa10eaecf2d3e415dccb7d358e50a4db175 (patch)
tree6b358875a16a70c6dd8d0f153719fec86a5ef9a8 /llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
parent1097dc47eb69b0e488767cb3f0362c10d5e642e2 (diff)
downloadbcm5719-llvm-74bfafa10eaecf2d3e415dccb7d358e50a4db175.tar.gz
bcm5719-llvm-74bfafa10eaecf2d3e415dccb7d358e50a4db175.zip
Re-land "Fix faulty assertion in debug info"
This had been reverted because the new test failed on non-X86 bots. I moved the new test to the appropriate subdirectory to correct this. Differential Revision: https://reviews.llvm.org/D41264 Original submission: r321122 (which was reverted by r321125) This reverts commit 3c1639b5703c387a0d8cba2862803b4e68dff436. llvm-svn: 321911
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
index d94b0e5c211..2e5c2244793 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
@@ -163,7 +163,8 @@ uint64_t DebugHandlerBase::getBaseTypeSize(const DITypeRef TyRef) {
DIType *BaseType = DDTy->getBaseType().resolve();
- assert(BaseType && "Unexpected invalid base type");
+ if (!BaseType)
+ return 0;
// If this is a derived type, go ahead and get the base type, unless it's a
// reference then it's just the size of the field. Pointer types have no need
OpenPOWER on IntegriCloud