llvm-project/llvm/tools/llvm-objcopy
Simon Pilgrim 43ff058e78 [llvm-objcopy] IHexELFBuilder::addDataSections - fix evaluation ordering static analyzer warning
As detailed on https://pvs-studio.com/en/blog/posts/cpp/0771/ and raised on D62583, the SecNo++ increment is not guaranteed to occur before the second use of SecNo in the same addSection() call.

This patch pulls out the increment (just for clarity) and replaces the second use of SecNo with a constant zero value (we're using stable_sort so the value isn't critical).

Differential Revision: https://reviews.llvm.org/D107273
2021-08-03 12:16:59 +01:00
..
COFF [llvm-objcopy] Refactor CopyConfig structure. 2021-05-20 13:14:51 +03:00
ELF [llvm-objcopy] IHexELFBuilder::addDataSections - fix evaluation ordering static analyzer warning 2021-08-03 12:16:59 +01:00
MachO [llvm-objcopy][MachO] Ignore all LC_SUB_* commands. 2021-07-28 17:35:26 -07:00
wasm [llvm-strip][WebAssembly] Support strip flags 2021-07-14 14:17:02 -07:00
BitcodeStripOpts.td
CMakeLists.txt [llvm-objcopy] Refactor CopyConfig structure. 2021-05-20 13:14:51 +03:00
CommonConfig.h [llvm-objcopy] Improve performance of long pattern lists 2021-07-12 09:03:34 -07:00
CommonOpts.td [llvm-objcopy][MachO] Add support for --keep-undefined 2021-03-08 18:57:25 -08:00
ConfigManager.cpp [llvm-strip][WebAssembly] Support strip flags 2021-07-14 14:17:02 -07:00
ConfigManager.h [llvm-objcopy][NFC] Refactor CopyConfig structure - remove lazy options processing. 2021-05-31 14:40:27 +03:00
InstallNameToolOpts.td
MultiFormatConfig.h [llvm-objcopy] Refactor CopyConfig structure. 2021-05-20 13:14:51 +03:00
ObjcopyOpts.td [llvm-objcopy] Delete --build-id-link-{dir,input,output} 2021-02-15 11:17:32 -08:00
StripOpts.td
llvm-objcopy.cpp [llvm] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
llvm-objcopy.h [llvm-objcopy] Refactor CopyConfig structure. 2021-05-20 13:14:51 +03:00