[lld] af263ce - [LLD][ELF] Silence warning when building with Clang ToT
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 25 06:34:41 PST 2024
Author: Alexandre Ganea
Date: 2024-01-25T09:34:18-05:00
New Revision: af263ceb90b9fe39ae1d3458c9f35b6b199d3951
URL: https://github.com/llvm/llvm-project/commit/af263ceb90b9fe39ae1d3458c9f35b6b199d3951
DIFF: https://github.com/llvm/llvm-project/commit/af263ceb90b9fe39ae1d3458c9f35b6b199d3951.diff
LOG: [LLD][ELF] Silence warning when building with Clang ToT
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.
```
Added:
Modified:
lld/ELF/MapFile.cpp
Removed:
################################################################################
diff --git a/lld/ELF/MapFile.cpp b/lld/ELF/MapFile.cpp
index 8b10ae183ae35dd..c4f3fdde30f36a7 100644
--- a/lld/ELF/MapFile.cpp
+++ b/lld/ELF/MapFile.cpp
@@ -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;
}
More information about the llvm-commits
mailing list