[PATCH] D72619: [mlir] NFC: Rename index_t to mlir_index_t
Rainer Orth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 13 06:54:09 PST 2020
ro created this revision.
Herald added subscribers: liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini, arphaman, fedor.sergeev, jyknight.
Herald added a project: LLVM.
mlir currently fails to build on Solaris:
/vol/llvm/src/llvm-project/dist/mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp:78:20: error: reference to 'index_t' is ambiguous
IndexHandle zero(index_t(0)), one(index_t(1));
^
/usr/include/sys/types.h:103:16: note: candidate found by name lookup is 'index_t'
typedef short index_t;
^
/vol/llvm/src/llvm-project/dist/mlir/include/mlir/EDSC/Builders.h:27:8: note: candidate found by name lookup is 'mlir::edsc::index_t'
struct index_t {
^
and many more.
Given that POSIX reserves all identifiers ending in `_t` 2.2.2 The Name Space <https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html>, it seems
quite unwise to use such identifiers in user code, even more so without a distinguished
prefix.
The following patch fixes this by adding a `mlir_` prefix as is already used in other
cases.
Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
Ok for master?
Btw., it would be helpful if mlir were either listed in the global `CODE_OWNERS.TXT` or had one of its own.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D72619
Files:
mlir/docs/EDSC.md
mlir/include/mlir/EDSC/Builders.h
mlir/include/mlir/EDSC/Intrinsics.h
mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp
mlir/lib/EDSC/Builders.cpp
mlir/lib/EDSC/Helpers.cpp
mlir/test/EDSC/builder-api-test.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72619.237663.patch
Type: text/x-patch
Size: 6058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200113/efb5c449/attachment.bin>
More information about the llvm-commits
mailing list