This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Some clean up / refactoring in sanitizer_symbolizer_libcdep.cpp.
ClosedPublic

Authored by Dor1s on Feb 6 2020, 8:46 AM.

Details

Summary

Nothing critical, just a few potential improvements I've noticed while reading
the code:

  • return false when symbolizer buffer is too small to read all data
  • invert some conditions to reduce indentation
  • prefer nullptr over 0 for pointers; init some pointers on stack;
  • remove minor code duplication

Diff Detail

Event Timeline

Dor1s created this revision.Feb 6 2020, 8:46 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 6 2020, 8:46 AM
Herald added subscribers: llvm-commits, Restricted Project, dberris. · View Herald Transcript
vitalybuka accepted this revision.Feb 6 2020, 3:02 PM
This revision is now accepted and ready to land.Feb 6 2020, 3:02 PM
This revision was automatically updated to reflect the committed changes.
Dor1s added a comment.Feb 10 2020, 9:21 AM

Looks like there is potentially relevant failure in: http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/29265

Will wait a bit longer and may have to revert then :|