Skip to content

Commit e90b7b1

Browse files
Merge pull request #1352 from adrian-prantl/64387149
Delete SDK path code from DeserializeAllCompilerFlags (NFCish)
2 parents dc526eb + 641ab4c commit e90b7b1

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

lldb/source/Symbol/SwiftASTContext.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,6 @@ static bool DeserializeAllCompilerFlags(SwiftASTContext &swift_ast,
13361336
bool &found_swift_modules) {
13371337
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES));
13381338
bool found_validation_errors = false;
1339-
std::string last_sdk_path;
13401339
got_serialized_options = false;
13411340
auto &invocation = swift_ast.GetCompilerInvocation();
13421341
auto ast_file_datas = module.GetASTData(eLanguageTypeSwift);
@@ -1375,16 +1374,11 @@ static bool DeserializeAllCompilerFlags(SwiftASTContext &swift_ast,
13751374
StringRef moduleData = buf.substr(0, info.bytes);
13761375
got_serialized_options |=
13771376
DeserializeCompilerFlags(invocation, moduleData, info.name, error);
1378-
LOG_PRINTF(LIBLLDB_LOG_TYPES, "SDK path from module \"%s\" is \"%s\".",
1377+
LOG_PRINTF(LIBLLDB_LOG_TYPES, "SDK path from module \"%s\" was \"%s\".",
13791378
info.name.str().c_str(),
13801379
invocation.getSDKPath().str().c_str());
1381-
if (!last_sdk_path.empty()) {
1382-
// Always let the more specific SDK path win.
1383-
if (invocation.getSDKPath() != last_sdk_path)
1384-
if (last_sdk_path.size() > invocation.getSDKPath().size())
1385-
invocation.setSDKPath(last_sdk_path);
1386-
}
1387-
last_sdk_path = invocation.getSDKPath();
1380+
// We will deduce a matching SDK path from DWARF later.
1381+
invocation.setSDKPath("");
13881382
}
13891383
}
13901384
LOG_PRINTF(LIBLLDB_LOG_TYPES, "Picking SDK path \"%s\".",

0 commit comments

Comments
 (0)