[compiler-rt] [compiler-rt] Simplify definition of uptr (PR #106155)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 00:49:05 PDT 2024


mstorsjo wrote:

This change also breaks i686 mingw builds in the same way as #106135 
```
In file included from /home/martin/code/llvm-mingw/llvm-project/compiler-rt/lib/interception/interception_win.cpp:132:
In file included from /home/martin/clang-trunk/i686-w64-mingw32/include/windows.h:69:
In file included from /home/martin/clang-trunk/i686-w64-mingw32/include/windef.h:9:
In file included from /home/martin/clang-trunk/i686-w64-mingw32/include/minwindef.h:163:
In file included from /home/martin/clang-trunk/i686-w64-mingw32/include/winnt.h:150:
/home/martin/clang-trunk/i686-w64-mingw32/include/basetsd.h:147:39: error: typedef redefinition with different types ('ULONG_PTR' (aka 'unsigned long') vs '__sanitizer::uptr' (aka 'unsigned int'))
  147 |   __MINGW_EXTENSION typedef ULONG_PTR SIZE_T,*PSIZE_T;
      |                                       ^
/home/martin/code/llvm-mingw/llvm-project/compiler-rt/lib/interception/interception.h:28:30: note: previous definition is here
   28 | typedef __sanitizer::uptr    SIZE_T;
      |                              ^
In file included from /home/martin/code/llvm-mingw/llvm-project/compiler-rt/lib/interception/interception_win.cpp:132:
In file included from /home/martin/clang-trunk/i686-w64-mingw32/include/windows.h:69:
In file included from /home/martin/clang-trunk/i686-w64-mingw32/include/windef.h:9:
In file included from /home/martin/clang-trunk/i686-w64-mingw32/include/minwindef.h:163:
In file included from /home/martin/clang-trunk/i686-w64-mingw32/include/winnt.h:150:
/home/martin/clang-trunk/i686-w64-mingw32/include/basetsd.h:148:38: error: typedef redefinition with different types ('LONG_PTR' (aka 'long') vs '__sanitizer::sptr' (aka 'int'))
  148 |   __MINGW_EXTENSION typedef LONG_PTR SSIZE_T,*PSSIZE_T;
      |                                      ^
/home/martin/code/llvm-mingw/llvm-project/compiler-rt/lib/interception/interception.h:29:30: note: previous definition is here
   29 | typedef __sanitizer::sptr    SSIZE_T;
      |                              ^
2 errors generated.
```

https://github.com/llvm/llvm-project/pull/106155


More information about the llvm-commits mailing list