Home
last modified time | relevance | path

Searched refs:Writer (Results 1 – 25 of 157) sorted by relevance

1234567

/freebsd-12-stable/contrib/llvm-project/llvm/lib/DebugInfo/PDB/Native/
DPDBStringTableBuilder.cpp153 Error PDBStringTableBuilder::writeHeader(BinaryStreamWriter &Writer) const { in writeHeader()
159 if (auto EC = Writer.writeObject(H)) in writeHeader()
161 assert(Writer.bytesRemaining() == 0); in writeHeader()
165 Error PDBStringTableBuilder::writeStrings(BinaryStreamWriter &Writer) const { in writeStrings()
166 if (auto EC = Strings.commit(Writer)) in writeStrings()
169 assert(Writer.bytesRemaining() == 0); in writeStrings()
173 Error PDBStringTableBuilder::writeHashTable(BinaryStreamWriter &Writer) const { in writeHashTable()
176 if (auto EC = Writer.writeInteger(BucketCount)) in writeHashTable()
194 if (auto EC = Writer.writeArray(ArrayRef<ulittle32_t>(Buckets))) in writeHashTable()
197 assert(Writer.bytesRemaining() == 0); in writeHashTable()
[all …]
DGSIStreamBuilder.cpp54 Error commit(BinaryStreamWriter &Writer);
130 Error GSIHashStreamBuilder::commit(BinaryStreamWriter &Writer) { in commit() argument
137 if (auto EC = Writer.writeObject(Header)) in commit()
140 if (auto EC = Writer.writeArray(makeArrayRef(HashRecords))) in commit()
142 if (auto EC = Writer.writeArray(makeArrayRef(HashBitmap))) in commit()
144 if (auto EC = Writer.writeArray(makeArrayRef(HashBuckets))) in commit()
381 static Error writePublics(BinaryStreamWriter &Writer, in writePublics() argument
387 if (Error E = Writer.writeBytes(Storage)) in writePublics()
393 static Error writeRecords(BinaryStreamWriter &Writer, in writeRecords() argument
398 return Writer.writeStreamRef(RecordsRef); in writeRecords()
[all …]
DDbiStreamBuilder.cpp92 DbgStreams[(int)Type]->WriteFn = [Data](BinaryStreamWriter &Writer) { in addDbgStream() argument
93 return Writer.writeArray(Data); in addDbgStream()
294 [this](BinaryStreamWriter &Writer) { in finalizeMsfLayout() argument
295 return NewFpoData->commit(Writer); in finalizeMsfLayout()
304 [this](BinaryStreamWriter &Writer) { in finalizeMsfLayout() argument
305 return Writer.writeArray(makeArrayRef(OldFpoData)); in finalizeMsfLayout()
393 BinaryStreamWriter Writer(*DbiS); in commit() local
394 if (auto EC = Writer.writeObject(*Header)) in commit()
398 if (auto EC = M->commit(Writer)) in commit()
410 if (auto EC = Writer.writeEnum(DbiSecContribVer60)) in commit()
[all …]
DInfoStreamBuilder.cpp62 BinaryStreamWriter Writer(*InfoS); in commit() local
69 if (auto EC = Writer.writeObject(H)) in commit()
72 if (auto EC = NamedStreams.commit(Writer)) in commit()
74 if (auto EC = Writer.writeInteger(0)) in commit()
77 if (auto EC = Writer.writeEnum(E)) in commit()
80 assert(Writer.bytesRemaining() == 0); in commit()
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/ARM/MCTargetDesc/
DARMMachObjectWriter.cpp30 void RecordARMScatteredRelocation(MachObjectWriter *Writer,
39 void RecordARMScatteredHalfRelocation(MachObjectWriter *Writer,
46 bool requiresExternRelocation(MachObjectWriter *Writer,
55 void recordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,
140 RecordARMScatteredHalfRelocation(MachObjectWriter *Writer, in RecordARMScatteredHalfRelocation() argument
157 unsigned IsPCRel = Writer->isFixupKindPCRel(Asm, Fixup.getKind()); in RecordARMScatteredHalfRelocation()
170 uint32_t Value = Writer->getSymbolAddress(*A, Layout); in RecordARMScatteredHalfRelocation()
172 uint64_t SecAddr = Writer->getSectionAddress(A->getFragment()->getParent()); in RecordARMScatteredHalfRelocation()
187 Value2 = Writer->getSymbolAddress(B->getSymbol(), Layout); in RecordARMScatteredHalfRelocation()
188 FixedValue -= Writer->getSectionAddress(SB->getFragment()->getParent()); in RecordARMScatteredHalfRelocation()
[all …]
/freebsd-12-stable/contrib/llvm-project/llvm/tools/llvm-readobj/
DCOFFImportDumper.cpp23 void dumpCOFFImportFile(const COFFImportFile *File, ScopedPrinter &Writer) { in dumpCOFFImportFile() argument
24 Writer.startLine() << '\n'; in dumpCOFFImportFile()
25 Writer.printString("File", File->getFileName()); in dumpCOFFImportFile()
26 Writer.printString("Format", "COFF-import-file"); in dumpCOFFImportFile()
30 case COFF::IMPORT_CODE: Writer.printString("Type", "code"); break; in dumpCOFFImportFile()
31 case COFF::IMPORT_DATA: Writer.printString("Type", "data"); break; in dumpCOFFImportFile()
32 case COFF::IMPORT_CONST: Writer.printString("Type", "const"); break; in dumpCOFFImportFile()
37 Writer.printString("Name type", "ordinal"); in dumpCOFFImportFile()
40 Writer.printString("Name type", "name"); in dumpCOFFImportFile()
43 Writer.printString("Name type", "noprefix"); in dumpCOFFImportFile()
[all …]
Dllvm-readobj.cpp292 createDumper(const ObjectFile &Obj, ScopedPrinter &Writer) { in createDumper() argument
294 return createCOFFDumper(*COFFObj, Writer); in createDumper()
297 return createELFDumper(*ELFObj, Writer); in createDumper()
300 return createMachODumper(*MachOObj, Writer); in createDumper()
303 return createWasmDumper(*WasmObj, Writer); in createDumper()
306 return createXCOFFDumper(*XObj, Writer); in createDumper()
313 static void dumpObject(ObjectFile &Obj, ScopedPrinter &Writer, in dumpObject() argument
325 Expected<std::unique_ptr<ObjDumper>> DumperOrErr = createDumper(Obj, Writer); in dumpObject()
331 Writer.startLine() << "\n"; in dumpObject()
332 Writer.printString("File", FileStr); in dumpObject()
[all …]
DObjDumper.h37 ObjDumper(ScopedPrinter &Writer, StringRef ObjName);
137 ScopedPrinter &Writer);
140 ScopedPrinter &Writer);
143 ScopedPrinter &Writer);
146 ScopedPrinter &Writer);
149 ScopedPrinter &Writer);
152 ScopedPrinter &Writer);
154 void dumpCodeViewMergedTypes(ScopedPrinter &Writer,
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/X86/MCTargetDesc/
DX86MachObjectWriter.cpp27 bool recordScatteredRelocation(MachObjectWriter *Writer,
35 void recordTLVPRelocation(MachObjectWriter *Writer,
43 void RecordX86Relocation(MachObjectWriter *Writer,
50 void RecordX86_64Relocation(MachObjectWriter *Writer, MCAssembler &Asm,
59 void recordRelocation(MachObjectWriter *Writer, MCAssembler &Asm, in recordRelocation() argument
63 if (Writer->is64Bit()) in recordRelocation()
64 RecordX86_64Relocation(Writer, Asm, Layout, Fragment, Fixup, Target, in recordRelocation()
67 RecordX86Relocation(Writer, Asm, Layout, Fragment, Fixup, Target, in recordRelocation()
103 MachObjectWriter *Writer, MCAssembler &Asm, const MCAsmLayout &Layout, in RecordX86_64Relocation() argument
106 unsigned IsPCRel = Writer->isFixupKindPCRel(Asm, Fixup.getKind()); in RecordX86_64Relocation()
[all …]
/freebsd-12-stable/contrib/llvm-project/clang/include/clang/Serialization/
DASTRecordWriter.h28 ASTWriter *Writer; variable
59 : DataStreamBasicWriter(W.getASTContext()), Writer(&W), Record(&Record) {} in ASTRecordWriter()
64 : DataStreamBasicWriter(Parent.getASTContext()), Writer(Parent.Writer), in ASTRecordWriter()
90 uint64_t Offset = Writer->Stream.GetCurrentBitNo();
92 Writer->Stream.EmitRecord(Code, *Record, Abbrev);
100 PrepareToEmit(Writer->Stream.GetCurrentBitNo());
101 Writer->Stream.EmitRecord(Code, *Record, Abbrev);
102 return Writer->Stream.GetCurrentBitNo();
132 return Writer->AddSourceLocation(Loc, *Record); in AddSourceLocation()
140 return Writer->AddSourceRange(Range, *Record); in AddSourceRange()
[all …]
/freebsd-12-stable/contrib/llvm-project/llvm/tools/llvm-xray/
Dxray-converter.cpp98 support::endian::Writer Writer(OS, support::endianness::little); in exportAsRAWv1() local
100 Writer.write(FH.Version); in exportAsRAWv1()
101 Writer.write(FH.Type); in exportAsRAWv1()
107 Writer.write(Bitfield); in exportAsRAWv1()
108 Writer.write(FH.CycleFrequency); in exportAsRAWv1()
112 Writer.write(Padding4B); in exportAsRAWv1()
113 Writer.write(Padding4B); in exportAsRAWv1()
114 Writer.write(Padding4B); in exportAsRAWv1()
115 Writer.write(Padding4B); in exportAsRAWv1()
123 Writer.write(R.RecordType); in exportAsRAWv1()
[all …]
/freebsd-12-stable/contrib/llvm-project/llvm/lib/DebugInfo/CodeView/
DSimpleTypeSerializer.cpp17 static void addPadding(BinaryStreamWriter &Writer) { in addPadding() argument
18 uint32_t Align = Writer.getOffset() % 4; in addPadding()
25 cantFail(Writer.writeInteger(Pad)); in addPadding()
36 BinaryStreamWriter Writer(ScratchBuffer, support::little); in serialize() local
37 TypeRecordMapping Mapping(Writer); in serialize()
41 cantFail(Writer.writeObject(DummyPrefix)); in serialize()
50 addPadding(Writer); in serialize()
54 Prefix->RecordLen = Writer.getOffset() - sizeof(uint16_t); in serialize()
56 return {ScratchBuffer.data(), Writer.getOffset()}; in serialize()
DCodeViewRecordIO.cpp82 return Writer->padToAlignment(Align); in padToAlignment()
107 if (auto EC = Writer->writeBytes(Bytes)) in mapByteVectorTail()
137 if (auto EC = Writer->writeInteger(TypeInd.getIndex())) in mapInteger()
216 if (auto EC = Writer->writeCString(S)) in mapStringZ()
241 if (auto EC = Writer->writeBytes(Guid.Guid)) in mapGuid()
332 if (auto EC = Writer->writeInteger<uint16_t>(LF_CHAR)) in writeEncodedSignedInteger()
334 if (auto EC = Writer->writeInteger<int8_t>(Value)) in writeEncodedSignedInteger()
337 if (auto EC = Writer->writeInteger<uint16_t>(LF_SHORT)) in writeEncodedSignedInteger()
339 if (auto EC = Writer->writeInteger<int16_t>(Value)) in writeEncodedSignedInteger()
342 if (auto EC = Writer->writeInteger<uint16_t>(LF_LONG)) in writeEncodedSignedInteger()
[all …]
DSymbolSerializer.cpp23 : Storage(Allocator), Stream(RecordBuffer, support::little), Writer(Stream), in SymbolSerializer()
24 Mapping(Writer, Container) {} in SymbolSerializer()
29 Writer.setOffset(0); in visitSymbolBegin()
47 uint32_t RecordEnd = Writer.getOffset(); in visitSymbolEnd()
49 Writer.setOffset(0); in visitSymbolEnd()
50 if (auto EC = Writer.writeInteger(Length)) in visitSymbolEnd()
DDebugStringTableSubsection.cpp64 Error DebugStringTableSubsection::commit(BinaryStreamWriter &Writer) const { in commit()
65 uint32_t Begin = Writer.getOffset(); in commit()
69 if (auto EC = Writer.writeCString(StringRef())) in commit()
75 Writer.setOffset(Offset); in commit()
76 if (auto EC = Writer.writeCString(S)) in commit()
78 assert(Writer.getOffset() <= End); in commit()
81 Writer.setOffset(End); in commit()
DDebugSubsectionRecord.cpp68 Error DebugSubsectionRecordBuilder::commit(BinaryStreamWriter &Writer, in commit() argument
70 assert(Writer.getOffset() % alignOf(Container) == 0 && in commit()
81 if (auto EC = Writer.writeObject(Header)) in commit()
84 if (auto EC = Subsection->commit(Writer)) in commit()
87 if (auto EC = Writer.writeStreamRef(Contents.getRecordData())) in commit()
90 if (auto EC = Writer.padToAlignment(4)) in commit()
/freebsd-12-stable/contrib/llvm-project/llvm/include/llvm/BinaryFormat/
DMsgPackWriter.h40 class Writer {
50 Writer(raw_ostream &OS, bool Compatible = false);
52 Writer(const Writer &) = delete;
53 Writer &operator=(const Writer &) = delete;
123 support::endian::Writer EW;
/freebsd-12-stable/contrib/llvm-project/compiler-rt/lib/profile/
DInstrProfilingPlatformLinux.c97 static int WriteOneBinaryId(ProfDataWriter *Writer, uint64_t BinaryIdLen, in WriteOneBinaryId() argument
102 if (Writer->Write(Writer, BinaryIdIOVec, in WriteOneBinaryId()
122 static int WriteBinaryIdForNote(ProfDataWriter *Writer, in WriteBinaryIdForNote() argument
133 if (Writer != NULL && in WriteBinaryIdForNote()
134 WriteOneBinaryId(Writer, BinaryIdLen, BinaryIdData) == -1) in WriteBinaryIdForNote()
148 static int WriteBinaryIds(ProfDataWriter *Writer, const ElfW(Nhdr) * Note, in WriteBinaryIds() argument
152 int Result = WriteBinaryIdForNote(Writer, Note); in WriteBinaryIds()
171 COMPILER_RT_VISIBILITY int __llvm_write_binary_ids(ProfDataWriter *Writer) { in __llvm_write_binary_ids() argument
188 return WriteBinaryIds(Writer, Note, NotesEnd); in __llvm_write_binary_ids()
198 COMPILER_RT_VISIBILITY int __llvm_write_binary_ids(ProfDataWriter *Writer) { in __llvm_write_binary_ids() argument
DInstrProfilingWriter.c217 static int writeValueProfData(ProfDataWriter *Writer, in writeValueProfData() argument
227 BufferIO = lprofCreateBufferIO(Writer); in writeValueProfData()
241 COMPILER_RT_VISIBILITY int lprofWriteData(ProfDataWriter *Writer, in lprofWriteData() argument
251 return lprofWriteDataImpl(Writer, DataBegin, DataEnd, CountersBegin, in lprofWriteData()
257 lprofWriteDataImpl(ProfDataWriter *Writer, const __llvm_profile_data *DataBegin, in lprofWriteDataImpl() argument
288 if (Writer->Write(Writer, IOVec, sizeof(IOVec) / sizeof(*IOVec))) in lprofWriteDataImpl()
292 if (__llvm_write_binary_ids(Writer) == -1) in lprofWriteDataImpl()
303 if (Writer->Write(Writer, IOVecData, sizeof(IOVecData) / sizeof(*IOVecData))) in lprofWriteDataImpl()
310 return writeValueProfData(Writer, VPDataReader, DataBegin, DataEnd); in lprofWriteDataImpl()
/freebsd-12-stable/contrib/llvm-project/llvm/lib/BinaryFormat/
DMsgPackWriter.cpp20 Writer::Writer(raw_ostream &OS, bool Compatible) in Writer() function in Writer
23 void Writer::writeNil() { EW.write(FirstByte::Nil); } in writeNil()
25 void Writer::write(bool b) { EW.write(b ? FirstByte::True : FirstByte::False); } in write()
27 void Writer::write(int64_t i) { in write()
60 void Writer::write(uint64_t u) { in write()
88 void Writer::write(double d) { in write()
101 void Writer::write(StringRef s) { in write()
121 void Writer::write(MemoryBufferRef Buffer) { in write()
141 void Writer::writeArraySize(uint32_t Size) { in writeArraySize()
157 void Writer::writeMapSize(uint32_t Size) { in writeMapSize()
[all …]
/freebsd-12-stable/contrib/llvm-project/llvm/lib/ProfileData/
DSampleProfWriter.cpp204 support::endian::Writer Writer(OS, support::little); in writeNameTable() local
206 Writer.write(MD5Hash(N)); in writeNameTable()
519 support::endian::Writer Writer(*OutputStream, support::little); in writeFuncOffsetTable() local
520 Writer.write(FuncOffsetTableStart); in writeFuncOffsetTable()
589 support::endian::Writer Writer(*OutputStream, support::little); in allocSecHdrTable() local
591 Writer.write(static_cast<uint64_t>(SectionHdrLayout.size())); in allocSecHdrTable()
594 Writer.write(static_cast<uint64_t>(-1)); in allocSecHdrTable()
595 Writer.write(static_cast<uint64_t>(-1)); in allocSecHdrTable()
596 Writer.write(static_cast<uint64_t>(-1)); in allocSecHdrTable()
597 Writer.write(static_cast<uint64_t>(-1)); in allocSecHdrTable()
[all …]
/freebsd-12-stable/contrib/llvm-project/lld/include/lld/Core/
DWriter.h25 class Writer {
27 virtual ~Writer();
39 Writer();
42 std::unique_ptr<Writer> createWriterMachO(const MachOLinkingContext &);
43 std::unique_ptr<Writer> createWriterYAML(const LinkingContext &);
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Target/AArch64/MCTargetDesc/
DAArch64MachObjectWriter.cpp43 void recordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,
152 MachObjectWriter *Writer, MCAssembler &Asm, const MCAsmLayout &Layout, in recordRelocation() argument
155 unsigned IsPCRel = Writer->isFixupKindPCRel(Asm, Fixup.getKind()); in recordRelocation()
239 Writer->addRelocation(A_Base, Fragment->getParent(), MRE); in recordRelocation()
284 Value += (!A->getFragment() ? 0 : Writer->getSymbolAddress(*A, Layout)) - in recordRelocation()
285 (!A_Base || !A_Base->getFragment() ? 0 : Writer->getSymbolAddress( in recordRelocation()
287 Value -= (!B->getFragment() ? 0 : Writer->getSymbolAddress(*B, Layout)) - in recordRelocation()
288 (!B_Base || !B_Base->getFragment() ? 0 : Writer->getSymbolAddress( in recordRelocation()
296 Writer->addRelocation(A_Base, Fragment->getParent(), MRE); in recordRelocation()
358 Value += Writer->getSymbolAddress(*Symbol, Layout); in recordRelocation()
[all …]
/freebsd-12-stable/contrib/llvm-project/llvm/include/llvm/DebugInfo/CodeView/
DCodeViewRecordIO.h46 return Writer->getOffset(); in getCurrentOffset()
58 explicit CodeViewRecordIO(BinaryStreamWriter &Writer) : Writer(&Writer) {} in CodeViewRecordIO() argument
70 return (Streamer != nullptr) && (Reader == nullptr) && (Writer == nullptr); in isStreaming()
73 return (Reader != nullptr) && (Streamer == nullptr) && (Writer == nullptr); in isReading()
76 return (Writer != nullptr) && (Streamer == nullptr) && (Reader == nullptr); in isWriting()
91 return Writer->writeObject(Value); in mapObject()
109 return Writer->writeInteger(Value);
158 if (auto EC = Writer->writeInteger(Size))
263 BinaryStreamWriter *Writer = nullptr; variable
/freebsd-12-stable/contrib/llvm-project/lld/lib/Core/
DWriter.cpp13 Writer::Writer() = default;
15 Writer::~Writer() = default;

1234567