Skip to content

Commit cc6729a

Browse files
Merge pull request #80171 from cachemeifyoucan/eng/PR-147438789
[IRGen] Remove a static variable that caches pointer value
2 parents a9bd28d + 279787e commit cc6729a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/IRGen/IRGenModule.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,14 +1428,9 @@ llvm::Module *IRGenModule::getModule() const {
14281428
}
14291429

14301430
bool IRGenModule::IsWellKnownBuiltinOrStructralType(CanType T) const {
1431-
static const CanType kStructural[] = {
1432-
Context.TheEmptyTupleType, Context.TheNativeObjectType,
1433-
Context.TheBridgeObjectType, Context.TheRawPointerType,
1434-
Context.getAnyObjectType()
1435-
};
1436-
1437-
if (std::any_of(std::begin(kStructural), std::end(kStructural),
1438-
[T](const CanType &ST) { return T == ST; }))
1431+
if (T == Context.TheEmptyTupleType || T == Context.TheNativeObjectType ||
1432+
T == Context.TheBridgeObjectType || T == Context.TheRawPointerType ||
1433+
T == Context.getAnyObjectType())
14391434
return true;
14401435

14411436
if (auto IntTy = dyn_cast<BuiltinIntegerType>(T)) {

0 commit comments

Comments
 (0)