Skip to content

Commit 9a30bbe

Browse files
author
git apple-llvm automerger
committed
Merge commit '6537df8e6c64' from swift/release/6.1 into stable/20240723
2 parents 99c0b86 + 6537df8 commit 9a30bbe

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntimeDynamicTypeResolution.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3133,6 +3133,15 @@ SwiftLanguageRuntime::ResolveTypeAlias(CompilerType alias) {
31333133
ThreadSafeReflectionContext reflection_ctx = GetReflectionContext();
31343134
if (!reflection_ctx)
31353135
return llvm::createStringError("no reflection context");
3136+
3137+
// FIXME: The current implementation that loads all conformances
3138+
// up-front creates too much small memory traffic. As a stop-gap,
3139+
// disable the feature on remote devices.
3140+
auto &triple = GetProcess().GetTarget().GetArchitecture().GetTriple();
3141+
if (triple.isOSDarwin() && !triple.isTargetMachineMac())
3142+
return llvm::createStringError("conformance loading disabled on remote "
3143+
"devices for performance reasons");
3144+
31363145
for (const std::string &protocol : GetConformances(in_type)) {
31373146
auto *type_ref =
31383147
reflection_ctx->LookupTypeWitness(in_type, member, protocol);

0 commit comments

Comments
 (0)