This is an archive of the discontinued LLVM Phabricator instance.

Restructure DwarfDebug::beginInstruction (NFC).
ClosedPublic

Authored by probinson on Nov 22 2016, 10:43 AM.

Details

Summary

Based on discussion in D24180, redo the method with less indentation which should help make the other patch easier to understand.

Diff Detail

Repository
rL LLVM

Event Timeline

probinson updated this revision to Diff 78893.Nov 22 2016, 10:43 AM
probinson retitled this revision from to Restructure DwarfDebug::beginInstruction (NFC)..
probinson updated this object.
probinson added reviewers: dblaikie, echristo.
probinson added a subscriber: llvm-commits.
dblaikie accepted this revision.Nov 22 2016, 10:49 AM
dblaikie edited edge metadata.
dblaikie added inline comments.
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
1016–1037 ↗(On Diff #78893)

Would it help to reverse these two and early return from the UnknownLocations case - so the major "if (DL)" case could be non-indented? (but if the way you've got it works best for your other patch, that's cool)

This revision is now accepted and ready to land.Nov 22 2016, 10:49 AM
probinson marked an inline comment as done.Nov 22 2016, 11:56 AM
probinson added inline comments.
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
1016–1037 ↗(On Diff #78893)

Yes, thanks, it does help a bit. That one is still the biggest case, even with the other patch.

This revision was automatically updated to reflect the committed changes.
probinson marked an inline comment as done.