Skip to content

Commit 89930f3

Browse files
hpoussinalexrp
authored andcommitted
Clang patch: [Mips] Correctly define IntPtrType
llvm/llvm-project#145158
1 parent 6442c8c commit 89930f3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ For other versions, check the git tags of this repository.
2424
* LLVM: Fix `Triple::isTargetEHABICompatible()` for NetBSD
2525
* Clang: Ignore the examples directory
2626
* Clang: Disable building of libclang-cpp.so.
27+
* Clang: Correctly define `IntPtrType` for MIPS
2728
* LLD: Added additional include directory to Zig's libunwind.
2829
* LLD: Respect `LLD_BUILD_TOOLS=OFF`
2930
* LLD: Skip building docs

clang/lib/Basic/Targets/Mips.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class LLVM_LIBRARY_VISIBILITY MipsTargetInfo : public TargetInfo {
129129
LongWidth = LongAlign = 32;
130130
MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32;
131131
PointerWidth = PointerAlign = 32;
132-
PtrDiffType = SignedInt;
132+
PtrDiffType = IntPtrType = SignedInt;
133133
SizeType = UnsignedInt;
134134
SuitableAlign = 64;
135135
}
@@ -155,7 +155,7 @@ class LLVM_LIBRARY_VISIBILITY MipsTargetInfo : public TargetInfo {
155155
IntMaxType = Int64Type;
156156
LongWidth = LongAlign = 64;
157157
PointerWidth = PointerAlign = 64;
158-
PtrDiffType = SignedLong;
158+
PtrDiffType = IntPtrType = SignedLong;
159159
SizeType = UnsignedLong;
160160
}
161161

@@ -165,7 +165,7 @@ class LLVM_LIBRARY_VISIBILITY MipsTargetInfo : public TargetInfo {
165165
IntMaxType = Int64Type;
166166
LongWidth = LongAlign = 32;
167167
PointerWidth = PointerAlign = 32;
168-
PtrDiffType = SignedInt;
168+
PtrDiffType = IntPtrType = SignedInt;
169169
SizeType = UnsignedInt;
170170
}
171171

0 commit comments

Comments
 (0)