MemRefUtils.h uses UINT_MAX, which is not included in current header files list. This patch include climits to avoid compilation error in this header file.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Please sort the includes alphabetically and specify the platform on which you see the compilation failure (none of those we test on seems to trigger it).
I can reproduce the failure with following procedures:
$ cat c.cpp
#include <mlir/ExecutionEngine/MemRefUtils.h>
$ clang++ -I$HOME/src/llvm-project/mlir/include -I$HOME/src/llvm-project/llvm/include -I$HOME/src/llvm-project/build/include -c -o c.o c.cpp
In file included from c.cpp:1:
/home/jinyun/src/llvm-project/mlir/include/mlir/ExecutionEngine/MemRefUtils.h:105:23: error: use of undeclared identifier 'UINT_MAX'
assert(sizeof(T) <= UINT_MAX && "Elemental type overflows"); ^
1 error generated.
Thanks ftynse for accepting. But I cannot commit it myself. Can someone please help to commit?
Your patch seems malformed though. If you created a different git commit instead of squashing, the patch only contains the _second_ commit. Please reupload the patch applicable to HEAD.
Last request, we need your name and email address as they should appear on the git commit.
(Note that using arcanist https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-command-line lets you avoid this step)