[PATCH] D74137: [compiler-rt] Some clean up / refactoring in sanitizer_symbolizer_libcdep.cpp.

Max Moroz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 08:50:36 PST 2020


Dor1s created this revision.
Dor1s added reviewers: eugenis, vitalybuka.
Herald added subscribers: llvm-commits, Sanitizers, dberris.
Herald added projects: Sanitizers, LLVM.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74137

Files:
  compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74137.242920.patch
Type: text/x-patch
Size: 6745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200206/1b9e648d/attachment.bin>


More information about the llvm-commits mailing list