[PATCH] D119323: [mlir][sparse] Rename index_t to index_type again

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 9 03:40:59 PST 2022


ro created this revision.
ro added reviewers: wrengr, aartbik.
ro added a project: MLIR.
Herald added subscribers: sdasgup3, wenzhicui, Chia-hungDuan, dcaballe, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini, arphaman, fedor.sergeev, jyknight.
ro requested review of this revision.
Herald added subscribers: stephenneuendorffer, nicolasvasilache.

While testing LLVM 14.0.0 rc1 on Solaris, I ran into a compile failure:

                   from /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp:22:
  /usr/include/sys/types.h:103:16: error: conflicting declaration ‘typedef short int index_t’
    103 | typedef short  index_t;
        |                ^~~~~~~
  In file included from /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp:17:
  /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/include/mlir/ExecutionEngine/SparseTensorUtils.h:26:7: note: previous declaration as ‘using index_t = uint64_t’
     26 | using index_t = uint64_t;
        |       ^~~~~~~

The same issue had already occured in the past and fixed in D72619 <https://reviews.llvm.org/D72619>.  More detailed explanation can also be found there.

Tested on `amd64-pc-solaris2.11` and `sparcv9-solaris2.11`.

This should obviously be backported to the `release/14.x` branch, too.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119323

Files:
  mlir/include/mlir/ExecutionEngine/SparseTensorUtils.h
  mlir/lib/ExecutionEngine/SparseTensorUtils.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119323.407110.patch
Type: text/x-patch
Size: 9973 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220209/a5ead052/attachment.bin>


More information about the llvm-commits mailing list