diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-02-13 00:32:21 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-02-13 00:32:21 +0000 |
| commit | 9ea90acfeb5207c034089187da2b49d97f3a6a7a (patch) | |
| tree | 21ca4fdb6f7b7d4b5fee57537528e5829a667472 /llvm/tools | |
| parent | 1bf1b9857f8733eabe009da9f529e0b1b5323a28 (diff) | |
| download | bcm5719-llvm-9ea90acfeb5207c034089187da2b49d97f3a6a7a.tar.gz bcm5719-llvm-9ea90acfeb5207c034089187da2b49d97f3a6a7a.zip | |
[dsymutil] Improve readability of cloneAllCompileUnits (NFC)
Add some newlines and improve consistency between the two loops.
llvm-svn: 353904
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/dsymutil/DwarfLinker.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/llvm/tools/dsymutil/DwarfLinker.cpp b/llvm/tools/dsymutil/DwarfLinker.cpp index ce8653173c3..3fe018a6f26 100644 --- a/llvm/tools/dsymutil/DwarfLinker.cpp +++ b/llvm/tools/dsymutil/DwarfLinker.cpp @@ -2242,7 +2242,9 @@ void DwarfLinker::DIECloner::cloneAllCompileUnits( cloneDIE(InputDIE, DMO, *CurrentUnit, StringPool, 0 /* PC offset */, 11 /* Unit Header size */, 0, CurrentUnit->getOutputUnitDIE()); } + Linker.OutputDebugInfoSize = CurrentUnit->computeNextUnitOffset(); + if (Linker.Options.NoOutput) continue; @@ -2251,9 +2253,12 @@ void DwarfLinker::DIECloner::cloneAllCompileUnits( // actually exist in the DIE tree. if (LLVM_LIKELY(!Linker.Options.Update) || Linker.Options.Translator) Linker.patchLineTableForUnit(*CurrentUnit, DwarfContext, Ranges, DMO); + Linker.emitAcceleratorEntriesForUnit(*CurrentUnit); - if (Linker.Options.Update) + + if (LLVM_UNLIKELY(Linker.Options.Update)) continue; + Linker.patchRangesForUnit(*CurrentUnit, DwarfContext, DMO); Linker.Streamer->emitLocationsForUnit(*CurrentUnit, DwarfContext); } @@ -2265,11 +2270,14 @@ void DwarfLinker::DIECloner::cloneAllCompileUnits( for (auto &CurrentUnit : CompileUnits) { if (LLVM_LIKELY(!Linker.Options.Update)) Linker.generateUnitRanges(*CurrentUnit); + CurrentUnit->fixupForwardReferences(); - if (CurrentUnit->getOutputUnitDIE()) { - Linker.Streamer->emitCompileUnitHeader(*CurrentUnit); - Linker.Streamer->emitDIE(*CurrentUnit->getOutputUnitDIE()); - } + + if (!CurrentUnit->getOutputUnitDIE()) + continue; + + Linker.Streamer->emitCompileUnitHeader(*CurrentUnit); + Linker.Streamer->emitDIE(*CurrentUnit->getOutputUnitDIE()); } } |

