Skip to content

Commit 163db7d

Browse files
committed
ObjectFile: correct Swift AST section name for PE/COFF
PE/COFF has a section name limit at 8 characters. To accommodate that we name the AST wrapping section `swiftast`. The ELF name (`.swift_ast`) was replicated here without adjustment which results in LLDB being unable to locate the modulewrap content. Match the behaviour of the compiler to allow LLDB to load the data.
1 parent 80c77db commit 163db7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ SectionType ObjectFilePECOFF::GetSectionType(llvm::StringRef sect_name,
10151015
// .eh_frame can be truncated to 8 chars.
10161016
.Cases(".eh_frame", ".eh_fram", eSectionTypeEHFrame)
10171017
.Case(".gosymtab", eSectionTypeGoSymtab)
1018-
.Case(".swift_ast", eSectionTypeSwiftModules) // downstream change
1018+
.Case("swiftast", eSectionTypeSwiftModules) // downstream change
10191019
.Default(eSectionTypeInvalid);
10201020
if (section_type != eSectionTypeInvalid)
10211021
return section_type;

0 commit comments

Comments
 (0)