Commit b521d1b8 authored by Fangrui Song's avatar Fangrui Song
Browse files

[llvm-nm] Simplify and fix a buffer overflow

* char SymbolAddrStr[18] can't hold "%" PRIo64 which may need 22 characters.
* Use range-based for
* Delete unnecessary typedef
* format(...).print(Str, sizeof(Str)) + outs() << Str => outs() << format(...)
* Use cascading outs() << .. << ..
* Use iterator_range(Container &&c)
* (A & B) == B => A & B   if B is a power of 2
* replace null sentinel in constants with makeArrayRef

llvm-svn: 359416
parent 43a015ab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment