Skip to content

Commit 6691974

Browse files
committed
[Cygwin] wint_t is unsigned int
Cygwin 32bit: $ echo | gcc -m32 -xc - -E -dM | grep WINT_T 145:#define __SIZEOF_WINT_T__ 4 315:#define __WINT_TYPE__ unsigned int Cygwin 64bit: $ echo | gcc -xc - -E -dM | grep WINT_T 147:#define __SIZEOF_WINT_T__ 4 317:#define __WINT_TYPE__ unsigned int
1 parent ac4893d commit 6691974

File tree

3 files changed

+430
-6
lines changed

3 files changed

+430
-6
lines changed

clang/lib/Basic/Targets/X86.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@ class LLVM_LIBRARY_VISIBILITY CygwinX86_32TargetInfo : public X86_32TargetInfo {
639639
CygwinX86_32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
640640
: X86_32TargetInfo(Triple, Opts) {
641641
this->WCharType = TargetInfo::UnsignedShort;
642+
this->WIntType = TargetInfo::UnsignedInt;
642643
DoubleAlign = LongLongAlign = 64;
643644
resetDataLayout("e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-"
644645
"i128:128-f80:32-n8:16:32-a:0:32-S32",
@@ -966,6 +967,7 @@ class LLVM_LIBRARY_VISIBILITY CygwinX86_64TargetInfo : public X86_64TargetInfo {
966967
CygwinX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
967968
: X86_64TargetInfo(Triple, Opts) {
968969
this->WCharType = TargetInfo::UnsignedShort;
970+
this->WIntType = TargetInfo::UnsignedInt;
969971
}
970972

971973
void getTargetDefines(const LangOptions &Opts,

0 commit comments

Comments
 (0)