mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1410148 - Backport llvm r289565 to clang 3.9. r=gps
I was able to reproduce the failure to apply llvm-dsymutil on the last mozilla-central revision before debug info was temporarily disabled for rust, and validated that the problem was gone in clang 4. After some bisection, r289565 was identified as having fixed the problem, which, reading the commit message, makes sense. It was however not possible to simply cherry-pick, because of multiple code changes between 3.9 and 4. However, apart from the volume of conflicting changes, it was more or less straightforward to backport. Interestingly, the patch for r313872 was relying on changes from r289565, which is why it required a variant specifically for 3.9, but now we can use the same patch as for other versions. Well, except there's a small difference in the context, and build-clang.py doesn't allow fuzz, so we manually edit the patch to remove that line from the context. --HG-- extra : rebase_source : cda077132ee499a8ffdc4c88a1160cfa5fd86a97
This commit is contained in:
parent
67185715fd
commit
8a6ab5b9ab
@ -18,6 +18,7 @@
|
||||
"llvm-debug-frame.patch",
|
||||
"r277806.patch",
|
||||
"r285657.patch",
|
||||
"r313872-for-3.9.patch"
|
||||
"r289565-for-3.9.patch",
|
||||
"r313872.patch"
|
||||
]
|
||||
}
|
||||
|
2469
build/build-clang/r289565-for-3.9.patch
Normal file
2469
build/build-clang/r289565-for-3.9.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,17 +0,0 @@
|
||||
--- 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;
|
@ -2,8 +2,7 @@ Index: tools/dsymutil/DwarfLinker.cpp
|
||||
===================================================================
|
||||
--- a/llvm/tools/dsymutil/DwarfLinker.cpp (revision 313871)
|
||||
+++ b/llvm/tools/dsymutil/DwarfLinker.cpp (revision 313872)
|
||||
@@ -1495,8 +1495,12 @@
|
||||
uint64_t RefOffset = *RefValue.getAsReference();
|
||||
@@ -1496,7 +1496,11 @@
|
||||
|
||||
if ((RefCU = getUnitForOffset(Units, RefOffset)))
|
||||
- if (const auto RefDie = RefCU->getOrigUnit().getDIEForOffset(RefOffset))
|
||||
|
Loading…
Reference in New Issue
Block a user