Lines Matching +defs:buffer +defs:file +defs:name

96   /// Link CodeView from each object file in the symbol table into the PDB.
102 /// Link info for each import file in the symbol table into the PDB.
105 void createModuleDBI(ObjFile *file);
107 /// Link CodeView from a single object file into the target (output) PDB.
124 // given object file into the given stream writer.
125 Error writeAllModuleSymbolRecords(ObjFile *file, BinaryStreamWriter &writer);
127 // Callback to copy and relocate debug symbols during PDB file writing.
161 /// PDBs use a single global string table for filenames in the file checksum
189 /// The object file whose .debug$S sections we're processing.
190 ObjFile &file;
233 DebugSHandler(COFFLinkerContext &ctx, PDBLinker &linker, ObjFile &file)
234 : ctx(ctx), linker(linker), file(file) {}
258 // the local file system, so we can make it native without ending up with a
353 // In an object file, GPROC32_ID has an embedded reference which refers to the
354 // single object file type index namespace. This has already been translated
355 // to the PDB file's ID stream index space, but we need to convert this to a
391 getSymbolName(CVSymbol(recordData)), source->file->getName(),
428 uint32_t storageBaseOffset, ObjFile *file) {
430 Warn(ctx) << "symbol scopes are not balanced in " << file->getName();
573 TpiSource *source = debugChunk->file->debugTypesObj;
580 // An object file may have S_xxx_ID symbols, but these get converted to
589 ObjFile *file = debugChunk->file;
600 Warn(ctx) << "empty symbols subsection in " << file->getName();
620 file->moduleDBI->getModuleIndex(), moduleSymOffset,
641 Warn(ctx) << "corrupt symbol records in " << file->getName();
647 Error PDBLinker::writeAllModuleSymbolRecords(ObjFile *file,
654 for (SectionChunk *debugChunk : file->getDebugChunks()) {
684 scopeStackClose(ctx, scopes, storage, moduleSymStart, file);
705 // TODO: Consider buffering symbols for the entire object file to reduce
731 sc.Imod = secChunk->file->moduleDBI->getModuleIndex();
827 << utohexstr(uint32_t(ss.kind())) << " in file "
828 << toString(&file);
873 debugChunk->file->debugTypesObj) {
874 TpiSource *source = debugChunk->file->debugTypesObj;
882 log("bad inlinee line record in " + debugChunk->file->getName() +
897 file.moduleDBI->addDebugSubsection(
929 file.moduleDBI->addUnmergedSymbols(&file, moduleStreamSize -
932 // We should have seen all debug subsections across the entire object file now
987 file.moduleDBI->setStringTableFixups(std::move(stringTableFixups));
989 // Make a new file checksum table that refers to offsets in the PDB-wide
993 // size as the original. Otherwise, the file references in the line and
1000 exitOnErr(dbiBuilder.addModuleSourceFile(*file.moduleDBI, filename));
1005 "file checksum table must have same layout");
1007 file.moduleDBI->addDebugSubsection(std::move(newChecksums));
1023 uint8_t *buffer = bAlloc().Allocate<uint8_t>(debugChunk.getSize());
1026 debugChunk.writeTo(buffer);
1027 return ArrayRef(buffer, debugChunk.getSize());
1031 // If this TpiSource doesn't have an object file, it must be from a type
1033 if (!source->file)
1040 DebugSHandler dsh(ctx, *this, *source->file);
1042 for (SectionChunk *debugChunk : source->file->getDebugChunks()) {
1074 // Add a module descriptor for every object file. We need to put an absolute
1078 void PDBLinker::createModuleDBI(ObjFile *file) {
1083 bool inArchive = !file->parentName.empty();
1084 objName = inArchive ? file->parentName : file->getName();
1086 StringRef modName = inArchive ? file->getName() : objName.str();
1088 file->moduleDBI = &exitOnErr(dbiBuilder.addModuleInfo(modName));
1089 file->moduleDBI->setObjFileName(objName);
1090 file->moduleDBI->setMergeSymbolsCallback(this, &commitSymbolsForObject);
1092 ArrayRef<Chunk *> chunks = file->getChunks();
1093 uint32_t modi = file->moduleDBI->getModuleIndex();
1100 file->moduleDBI->setFirstSectionContrib(sc);
1107 // type information, file checksums, and the string table. Add type info to
1108 // the PDB first, so that we can get the map from object file type and item
1116 warnUnusable(source->file, std::move(e),
1125 warnUnusable(source->file, std::move(typeError),
1226 StringRef name = def->getName();
1227 if (name.data()[0] == '_' && name.data()[1] == '_') {
1230 name = name.drop_front(1);
1231 if (name.starts_with("__profd_") || name.starts_with("__profc_") ||
1232 name.starts_with("__covrec_")) {
1250 SmallString<256> buffer;
1251 raw_svector_ostream stream(buffer);
1273 auto printLargeInputTypeRecs = [&](StringRef name,
1299 stream << "\nTop 10 types responsible for the most " << name
1314 (name == "TPI" ? "type" : "id"),
1325 Msg(ctx) << buffer;
1330 for (StringRef file : ctx.config.natvisFiles) {
1332 MemoryBuffer::getFile(file);
1334 Warn(ctx) << "Cannot open input file: " << file;
1344 builder.addInjectedSource(file, std::move(data));
1352 const StringRef stream = streamFile.getKey(), file = streamFile.getValue();
1354 MemoryBuffer::getFile(file);
1356 Warn(ctx) << "Cannot open input file: " << file;
1427 // anything here. Also, it seems we can use "LLVM Linker" for the linker name
1490 cgs.Name = sec->name;
1512 sym.Name = os.name;
1538 for (ImportFile *file : ctx.importFileInstances) {
1539 if (!file->live)
1542 if (!file->thunkSym)
1545 if (!file->thunkSym->isLive())
1548 std::string dll = StringRef(file->dllName).lower();
1552 SmallString<128> libPath = file->parentName;
1559 exitOnErr(dbiBuilder.addModuleInfo(file->dllName));
1566 mod = &exitOnErr(dbiBuilder.addModuleInfo("Import:" + file->dllName));
1570 DefinedImportThunk *thunk = cast<DefinedImportThunk>(file->thunkSym);
1579 ons.Name = file->dllName;
1620 // Creates a PDB file.
1624 llvm::TimeTraceScope timeScope("PDB file");
1638 llvm::TimeTraceScope timeScope("Commit PDB file to disk");
1731 // when trying to figure out why a PDB file is too large.
1739 Err(ctx) << "failed to write PDB file " << Twine(ctx.config.pdbPath);
1771 for (SectionChunk *dbgC : c->file->getDebugChunks()) {
1782 c->file->getSymbols()[r.SymbolTableIndex]))
1842 // Use CodeView line tables to resolve a file and line number for the given