@@ -4367,44 +4367,31 @@ void SwiftASTContext::RegisterSectionModules(
4367
4367
}
4368
4368
};
4369
4369
4370
- if (auto section_sp =
4371
- section_list->FindSectionByType (eSectionTypeSwiftModules, true )) {
4372
- DataExtractor section_data;
4373
-
4374
- if (section_sp->GetSectionData (section_data)) {
4375
- llvm::StringRef section_data_ref (
4376
- (const char *)section_data.GetDataStart (),
4377
- section_data.GetByteSize ());
4378
- parse_ast_section (section_data_ref, 1 , 1 );
4379
- }
4380
- } else {
4381
- if (m_ast_file_data_map.find (&module) != m_ast_file_data_map.end ())
4382
- return ;
4370
+ if (m_ast_file_data_map.find (&module) != m_ast_file_data_map.end ())
4371
+ return ;
4383
4372
4384
- // Grab all the AST blobs from the symbol vendor.
4385
- auto ast_file_datas = module.GetASTData (eLanguageTypeSwift);
4386
- LOG_PRINTF (GetLog (LLDBLog::Types),
4387
- " (\" %s\" ) retrieved %zu AST Data blobs from the symbol vendor "
4388
- " (filter=\" %s\" )." ,
4389
- GetBriefModuleName (module).c_str (), ast_file_datas.size (),
4390
- filter.str ().c_str ());
4391
-
4392
- // Add each of the AST blobs to the vector of AST blobs for
4393
- // the module.
4394
- auto &ast_vector = GetASTVectorForModule (&module);
4395
- ast_vector.insert (ast_vector.end (), ast_file_datas.begin (),
4396
- ast_file_datas.end ());
4397
-
4398
- // Retrieve the module names from the AST blobs retrieved
4399
- // from the symbol vendor.
4400
- size_t i = 0 ;
4401
- for (auto ast_file_data_sp : ast_file_datas) {
4402
- // Parse the AST section info from the AST blob.
4403
- llvm::StringRef section_data_ref (
4404
- (const char *)ast_file_data_sp->GetBytes (),
4405
- ast_file_data_sp->GetByteSize ());
4406
- parse_ast_section (section_data_ref, ++i, ast_file_datas.size ());
4407
- }
4373
+ // Grab all the AST blobs from the symbol vendor.
4374
+ auto ast_file_datas = module.GetASTData (eLanguageTypeSwift);
4375
+ LOG_PRINTF (GetLog (LLDBLog::Types),
4376
+ " (\" %s\" ) retrieved %zu AST Data blobs from the symbol vendor "
4377
+ " (filter=\" %s\" )." ,
4378
+ GetBriefModuleName (module).c_str (), ast_file_datas.size (),
4379
+ filter.str ().c_str ());
4380
+
4381
+ // Add each of the AST blobs to the vector of AST blobs for
4382
+ // the module.
4383
+ auto &ast_vector = GetASTVectorForModule (&module);
4384
+ ast_vector.insert (ast_vector.end (), ast_file_datas.begin (),
4385
+ ast_file_datas.end ());
4386
+
4387
+ // Retrieve the module names from the AST blobs retrieved
4388
+ // from the symbol vendor.
4389
+ size_t i = 0 ;
4390
+ for (auto ast_file_data_sp : ast_file_datas) {
4391
+ // Parse the AST section info from the AST blob.
4392
+ llvm::StringRef section_data_ref ((const char *)ast_file_data_sp->GetBytes (),
4393
+ ast_file_data_sp->GetByteSize ());
4394
+ parse_ast_section (section_data_ref, ++i, ast_file_datas.size ());
4408
4395
}
4409
4396
}
4410
4397
0 commit comments