mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
18 lines
647 B
Diff
18 lines
647 B
Diff
|
--- a/llvm/tools/dsymutil/DwarfLinker.cpp
|
||
|
+++ b/llvm/tools/dsymutil/DwarfLinker.cpp
|
||
|
@@ -1489,8 +1489,12 @@
|
||
|
uint64_t RefOffset = *RefValue.getAsReference(&Unit);
|
||
|
|
||
|
if ((RefCU = getUnitForOffset(Units, RefOffset)))
|
||
|
- if (const auto *RefDie = RefCU->getOrigUnit().getDIEForOffset(RefOffset))
|
||
|
- return RefDie;
|
||
|
+ if (const auto *RefDie = RefCU->getOrigUnit().getDIEForOffset(RefOffset)) {
|
||
|
+ // In a file with broken references, an attribute might point to a NULL
|
||
|
+ // DIE.
|
||
|
+ if(!RefDie->isNULL())
|
||
|
+ return RefDie;
|
||
|
+ }
|
||
|
|
||
|
Linker.reportWarning("could not find referenced DIE", &Unit, &DIE);
|
||
|
return nullptr;
|