This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Fix Visual Studio warnings
ClosedPublic

Authored by stella.stamenova on May 3 2022, 10:19 AM.

Details

Summary

There are only a couple of warnings when compiling with VS on Windows. This fixes the last remaining warnings so that we can enable LLVM_ENABLE_WERROR on the mlir windows bot.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald Transcript
stella.stamenova requested review of this revision.May 3 2022, 10:19 AM
rriddle accepted this revision.May 3 2022, 10:21 AM
rriddle added inline comments.
mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
60

1u? This looks identical to below.

This revision is now accepted and ready to land.May 3 2022, 10:21 AM
stella.stamenova added inline comments.
mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
60

You mean uint64_t(1u)? Or do you mean to use 1u because the statement below does?

The statement below is different (as it does a subtraction as well), so the Visual Studio compiler is happy with it.

Thanks for fixing these!

mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
60

I meant to use 1u, as that would make these consistent. Though maybe it's better to pull this out into a separate variable (to share)? It doesn't matter much to me either way, the comment was more in passing.

This revision was landed with ongoing or failed builds.May 3 2022, 2:13 PM
This revision was automatically updated to reflect the committed changes.