Page MenuHomePhabricator

Silence warnings when compiling x86 with latest MSVC
ClosedPublic

Authored by aganea on Mon, May 4, 10:01 AM.

Details

Summary

When using Visual Studio 2019 16.5.4, and targetting 32-bit, before this patch we were seeing:

[1378/3007] Building CXX object lib\ProfileData\CMakeFiles\LLVMProfileData.dir\InstrProfReader.cpp.obj
F:\llvm-project\llvm\lib\ProfileData\InstrProfReader.cpp(426): warning C4018: '>': signed/unsigned mismatch
F:\llvm-project\llvm\lib\ProfileData\InstrProfReader.cpp(415): note: while compiling class template member function 'llvm::Error llvm::RawInstrProfReader<uint32_t>::readRawCounts(llvm::InstrProfRecord &)'
F:\llvm-project\llvm\lib\ProfileData\InstrProfReader.cpp(491): note: see reference to function template instantiation 'llvm::Error llvm::RawInstrProfReader<uint32_t>::readRawCounts(llvm::InstrProfRecord &)' being compiled
F:\llvm-project\llvm\lib\ProfileData\InstrProfReader.cpp(78): note: see reference to class template instantiation 'llvm::RawInstrProfReader<uint32_t>' being compiled
F:\llvm-project\llvm\lib\ProfileData\InstrProfReader.cpp(430): warning C4018: '>': signed/unsigned mismatch

And:

[2060/3007] Building CXX object tools\clang\lib\Sema\CMakeFiles\obj.clangSema.dir\ParsedAttr.cpp.obj
F:\llvm-project\clang\lib\Sema\ParsedAttr.cpp(114): warning C4018: '<': signed/unsigned mismatch

I can commit the two files independently if you prefer.

Diff Detail

Event Timeline

aganea created this revision.Mon, May 4, 10:01 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMon, May 4, 10:01 AM
vsk accepted this revision.Mon, May 4, 2:01 PM

Thanks, this lgtm. If you could split this up into two commits before landing it, I'd appreciate it.

This revision is now accepted and ready to land.Mon, May 4, 2:01 PM
aganea added a comment.Mon, May 4, 2:19 PM

Will do, thank you for your time!

This revision was automatically updated to reflect the committed changes.