Skip to content

Commit 9698680

Browse files
committed
Added missing static and style fixup
1 parent 11e21b7 commit 9698680

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

compiler-rt/lib/tysan/tysan.cpp

+6-8
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static tysan_type_descriptor *getRootTD(tysan_type_descriptor *TD) {
103103
}
104104

105105
// Walk up TDA to see if it reaches TDB
106-
bool walkAliasTree(tysan_type_descriptor *TDA, tysan_type_descriptor *TDB,
106+
static bool walkAliasTree(tysan_type_descriptor *TDA, tysan_type_descriptor *TDB,
107107
uptr OffsetA, uptr OffsetB) {
108108
do {
109109
if (TDA == TDB)
@@ -160,17 +160,16 @@ static bool isAliasingLegalUp(tysan_type_descriptor *TDA,
160160
}
161161

162162
static bool isAliasingLegalWithOffset(tysan_type_descriptor *TDA,
163-
tysan_type_descriptor *TDB,
164-
int OffsetB) {
165-
// This is handled in the other cases
163+
tysan_type_descriptor *TDB, uptr OffsetB) {
164+
// This is handled by calls to isAliasingLegalUp.
166165
if (OffsetB == 0)
167166
return false;
168167

169-
// You can't have an offset into a member
168+
// You can't have an offset into a member.
170169
if (TDB->Tag == TYSAN_MEMBER_TD)
171170
return false;
172171

173-
int OffsetA = 0;
172+
uptr OffsetA = 0;
174173
if (TDA->Tag == TYSAN_MEMBER_TD) {
175174
OffsetA = TDA->Member.Offset;
176175
TDA = TDA->Member.Base;
@@ -185,8 +184,7 @@ static bool isAliasingLegalWithOffset(tysan_type_descriptor *TDA,
185184
}
186185

187186
static bool isAliasingLegal(tysan_type_descriptor *TDA,
188-
tysan_type_descriptor *TDB,
189-
int OffsetB = 0) {
187+
tysan_type_descriptor *TDB, uptr OffsetB = 0) {
190188
if (TDA == TDB || !TDB || !TDA)
191189
return true;
192190

0 commit comments

Comments
 (0)