Lines Matching refs:Sec
45 static bool isDebugSection(Section &Sec) { in isDebugSection() argument
46 return Sec.getName().startswith("__DWARF,"); in isDebugSection()
67 for (auto &Sec : G.sections()) { in preserveDebugSections() local
68 if (!isDebugSection(Sec)) in preserveDebugSections()
74 dbgs() << " Preserving debug section " << Sec.getName() << "\n"; in preserveDebugSections()
77 for (auto *Sym : Sec.symbols()) { in preserveDebugSections()
83 for (auto *B : Sec.blocks()) in preserveDebugSections()
129 Section *Sec = nullptr; in startSynthesis() member
139 for (auto &Sec : G.sections()) { in startSynthesis() local
140 if (llvm::empty(Sec.blocks())) in startSynthesis()
144 if (isDebugSection(Sec)) { in startSynthesis()
145 size_t SepPos = Sec.getName().find(','); in startSynthesis()
146 if (SepPos > 16 || (Sec.getName().size() - (SepPos + 1) > 16)) { in startSynthesis()
151 << Sec.getName() << "\"\n"; in startSynthesis()
155 DebugSecInfos.push_back({&Sec, Sec.getName().substr(0, SepPos), in startSynthesis()
156 Sec.getName().substr(SepPos + 1), 0, in startSynthesis()
159 NonDebugSections.push_back(&Sec); in startSynthesis()
164 SectionRange R(Sec); in startSynthesis()
170 G.createContentBlock(Sec, Padding, in startSynthesis()
192 assert(!llvm::empty(SI.Sec->blocks()) && "Empty debug info section?"); in startSynthesis()
196 dbgs() << " Appending " << SI.Sec->getName() << " (" in startSynthesis()
197 << SI.Sec->blocks_size() << " block(s)) at " in startSynthesis()
200 for (auto *B : SI.Sec->blocks()) { in startSynthesis()
206 auto &FirstBlock = **SI.Sec->blocks().begin(); in startSynthesis()
209 "First block in " + SI.Sec->getName() + in startSynthesis()
213 return make_error<StringError>("First block in " + SI.Sec->getName() + in startSynthesis()
220 G.mergeSections(SDOSec, *SI.Sec); in startSynthesis()
221 SI.Sec = nullptr; in startSynthesis()
267 typename MachOTraits::Section Sec; in startSynthesis() local
268 memset(&Sec, 0, sizeof(Sec)); in startSynthesis()
269 memcpy(Sec.sectname, SI.SecName.data(), SI.SecName.size()); in startSynthesis()
270 memcpy(Sec.segname, SI.SegName.data(), SI.SegName.size()); in startSynthesis()
271 Sec.addr = SI.StartAddr.getValue(); in startSynthesis()
272 Sec.size = SI.Size; in startSynthesis()
273 Sec.offset = SI.StartAddr.getValue(); in startSynthesis()
274 Sec.align = SI.Alignment; in startSynthesis()
275 Sec.reloff = 0; in startSynthesis()
276 Sec.nreloc = 0; in startSynthesis()
277 Sec.flags = MachO::S_ATTR_DEBUG; in startSynthesis()
278 Writer.write(Sec); in startSynthesis()
305 for (auto *Sec : NonDebugSections) { in completeSynthesisAndRegister() local
306 size_t SepPos = Sec->getName().find(','); in completeSynthesisAndRegister()
310 if ((SepPos == StringRef::npos && Sec->getName().size() <= 16)) { in completeSynthesisAndRegister()
313 SecName = Sec->getName(); in completeSynthesisAndRegister()
314 } else if (SepPos < 16 && (Sec->getName().size() - (SepPos + 1) <= 16)) { in completeSynthesisAndRegister()
316 SegName = Sec->getName().substr(0, SepPos); in completeSynthesisAndRegister()
317 SecName = Sec->getName().substr(SepPos + 1); in completeSynthesisAndRegister()
320 assert(Sec->getName().size() > 16 && in completeSynthesisAndRegister()
324 CustomSecName = Sec->getName().substr(0, 15 - IdxStr.size()).str(); in completeSynthesisAndRegister()
330 SectionRange R(*Sec); in completeSynthesisAndRegister()
442 for (auto &Sec : LG.sections()) in modifyPassConfigForMachO() local
443 if (MachODebugObjectSynthesizerBase::isDebugSection(Sec)) { in modifyPassConfigForMachO()