[PATCH] D100093: [JITLink] Minor fix to avoid Windows compiler warning for static-cast

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 30 02:56:02 PDT 2021


foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.

LGTM. The warning is still showing up in Windows buildbots e.g. https://lab.llvm.org/buildbot/#/builders/86/builds/12569

  C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\lib\ExecutionEngine\JITLink\x86_64.cpp(60): warning C4309: 'static_cast': truncation of constant value

As an alternative I think you could write just `char(0xFF)`. Both approaches have been used in the past according to `git log --grep "truncation of constant value"`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100093/new/

https://reviews.llvm.org/D100093



More information about the llvm-commits mailing list