Skip to content

Commit 743ec86

Browse files
committed
[LLDB] Clamp the ClangImporter DWARF version to 4
1 parent 3a2995b commit 743ec86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3053,7 +3053,7 @@ lldb::TypeSystemSP SwiftASTContext::CreateInstance(
30533053
ci_args.push_back(sdk_triple.str());
30543054
}
30553055
ci_args.push_back("-gmodules");
3056-
ci_args.push_back("-g");
3056+
ci_args.push_back("-gdwarf-4");
30573057
}
30583058

30593059
std::vector<swift::PluginSearchOption> plugin_search_options;
@@ -3192,7 +3192,7 @@ lldb::TypeSystemSP SwiftASTContext::CreateInstance(
31923192
swift_ast_sp->RegisterSectionModules(*image_sp, module_names);
31933193
}
31943194

3195-
{
3195+
if (!for_expressions && module_sp) {
31963196
auto ast_context = swift_ast_sp->GetASTContext();
31973197
if (!ast_context) {
31983198
logError("couldn't initialize Swift compiler");

0 commit comments

Comments
 (0)