Skip to content

Commit

Permalink
[LLD][ELF] Silence warning when building with Clang ToT
Browse files Browse the repository at this point in the history
This fixes:
```
[5839/7452] Building CXX object tools\lld\ELF\CMakeFiles\lldELF.dir\MapFile.cpp.obj
C:\git\llvm-project\lld\ELF\MapFile.cpp(124,38): warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'const ssize_t' (aka 'const int') [-Wsign-compare]
  124 |           last.outputOff + last.size == p.outputOff) {
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
1 warning generated.
```
  • Loading branch information
aganea committed Jan 25, 2024
1 parent 40dcf24 commit af263ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lld/ELF/MapFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static void printEhFrame(raw_ostream &os, const EhFrameSection *sec) {
if (!pieces.empty()) {
EhSectionPiece &last = pieces.back();
if (last.sec == p.sec && last.inputOff + last.size == p.inputOff &&
last.outputOff + last.size == p.outputOff) {
last.outputOff + last.size == (unsigned)p.outputOff) {
last.size += p.size;
return;
}
Expand Down

0 comments on commit af263ce

Please sign in to comment.