/openbsd-src/gnu/llvm/llvm/lib/DebugInfo/PDB/Native/ |
H A D | PDBStringTableBuilder.cpp | 154 Error PDBStringTableBuilder::writeHeader(BinaryStreamWriter &Writer) const { in writeHeader() 160 if (auto EC = Writer.writeObject(H)) in writeHeader() 162 assert(Writer.bytesRemaining() == 0); in writeHeader() 166 Error PDBStringTableBuilder::writeStrings(BinaryStreamWriter &Writer) const { in writeStrings() 167 if (auto EC = Strings.commit(Writer)) in writeStrings() 170 assert(Writer.bytesRemaining() == 0); in writeStrings() 174 Error PDBStringTableBuilder::writeHashTable(BinaryStreamWriter &Writer) const { in writeHashTable() 177 if (auto EC = Writer.writeInteger(BucketCount)) in writeHashTable() 195 if (auto EC = Writer.writeArray(ArrayRef<ulittle32_t>(Buckets))) in writeHashTable() 198 assert(Writer.bytesRemaining() == 0); in writeHashTable() [all …]
|
H A D | DbiStreamBuilder.cpp | 91 DbgStreams[(int)Type]->WriteFn = [Data](BinaryStreamWriter &Writer) { in addDbgStream() argument 92 return Writer.writeArray(Data); in addDbgStream() 293 [this](BinaryStreamWriter &Writer) { in finalizeMsfLayout() argument 294 return NewFpoData->commit(Writer); in finalizeMsfLayout() 303 [this](BinaryStreamWriter &Writer) { in finalizeMsfLayout() argument 304 return Writer.writeArray(ArrayRef(OldFpoData)); in finalizeMsfLayout() 390 BinaryStreamWriter Writer(*DbiS); in commit() local 391 if (auto EC = Writer.writeObject(*Header)) in commit() 395 if (auto EC = M->commit(Writer)) in commit() 407 if (auto EC = Writer.writeEnum(DbiSecContribVer60)) in commit() [all …]
|
H A D | InfoStreamBuilder.cpp | 60 BinaryStreamWriter Writer(*InfoS); in commit() local 67 if (auto EC = Writer.writeObject(H)) in commit() 70 if (auto EC = NamedStreams.commit(Writer)) in commit() 72 if (auto EC = Writer.writeInteger(0)) in commit() 75 if (auto EC = Writer.writeEnum(E)) in commit() 78 assert(Writer.bytesRemaining() == 0); in commit()
|
/openbsd-src/gnu/llvm/llvm/tools/llvm-readobj/ |
H A D | COFFImportDumper.cpp | 23 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 …]
|
H A D | llvm-readobj.cpp | 340 createDumper(const ObjectFile &Obj, ScopedPrinter &Writer) { in createDumper() argument 342 return createCOFFDumper(*COFFObj, Writer); in createDumper() 345 return createELFDumper(*ELFObj, Writer); in createDumper() 348 return createMachODumper(*MachOObj, Writer); in createDumper() 351 return createWasmDumper(*WasmObj, Writer); in createDumper() 354 return createXCOFFDumper(*XObj, Writer); in createDumper() 361 static void dumpObject(ObjectFile &Obj, ScopedPrinter &Writer, in dumpObject() argument 374 Expected<std::unique_ptr<ObjDumper>> DumperOrErr = createDumper(Obj, Writer); in dumpObject() 539 static void dumpArchive(const Archive *Arc, ScopedPrinter &Writer) { in dumpArchive() argument 551 dumpObject(*Obj, Writer, Arc); in dumpArchive() [all …]
|
/openbsd-src/gnu/llvm/llvm/lib/Target/ARM/MCTargetDesc/ |
H A D | ARMMachObjectWriter.cpp | 1 //===-- ARMMachObjectWriter.cpp - ARM Mach Object Writer ------------------===// 30 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() [all …]
|
/openbsd-src/gnu/llvm/llvm/lib/Target/X86/MCTargetDesc/ |
H A D | X86MachObjectWriter.cpp | 1 //===-- X86MachObjectWriter.cpp - X86 Mach-O Writer -----------------------===// 27 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 [all …]
|
/openbsd-src/gnu/llvm/compiler-rt/lib/xray/tests/unit/ |
H A D | fdr_log_writer_test.cpp | 45 FDRLogWriter Writer(B); in TEST() local 52 ASSERT_THAT(Writer.writeMetadataRecords(Preamble), in TEST() 54 ASSERT_TRUE(Writer.writeMetadata<MetadataRecord::RecordKinds::NewCPUId>(1)); in TEST() 56 Writer.writeFunction(FDRLogWriter::FunctionRecordKind::Enter, 1, 1)); in TEST() 58 Writer.writeFunction(FDRLogWriter::FunctionRecordKind::Exit, 1, 1)); in TEST() 83 FDRLogWriter Writer(B); in TEST() local 93 ASSERT_THAT(Writer.writeMetadataRecords(Preamble), in TEST() 95 ASSERT_TRUE(Writer.writeMetadata<MetadataRecord::RecordKinds::NewCPUId>( in TEST() 99 Writer.writeFunction(FDRLogWriter::FunctionRecordKind::Enter, 1, TSC++)); in TEST() 101 Writer.writeFunction(FDRLogWriter::FunctionRecordKind::Exit, 1, TSC++)); in TEST() [all …]
|
/openbsd-src/regress/lib/libpthread/pthread_rwlock/ |
H A D | pthread_rwlock.c | 14 * Set up an rwlock with a few reader threads, start a writer blocking, 15 * then let go the reader threads one by one. Verify that the writer 86 writer(void *arg) in writer() function 89 printf("writer started, state = %d\n", state); in writer() 92 printf("writer woken, state = %d\n", state); in writer() 95 printf("writer starting\n"); in writer() 101 printf("writer locked\n"); in writer() 110 printf("writer unlocking\n"); in writer() 116 printf("writer exiting\n"); in writer() 138 if ((r = pthread_create(&tw, NULL, writer, NULL))) in main() [all …]
|
/openbsd-src/gnu/llvm/llvm/include/llvm/BinaryFormat/ |
H A D | MsgPackWriter.h | 1 //===- MsgPackWriter.h - Simple MsgPack writer ------------------*- C++ -*-===// 10 /// This file contains a MessagePack writer. 18 /// msgpack::Writer MPWriter(output); 41 class Writer { 43 /// Construct a writer, optionally enabling "Compatibility Mode" as defined 46 /// When in \p Compatible mode, the writer will write \c Str16 formats 51 Writer(raw_ostream &OS, bool Compatible = false); 53 Writer(const Writer &) = delete; 54 Writer &operator=(const Writer &) = delete; 124 support::endian::Writer EW;
|
/openbsd-src/gnu/usr.bin/perl/cpan/Test-Harness/lib/TAP/Parser/YAMLish/ |
H A D | Writer.pm | 1 package TAP::Parser::YAMLish::Writer; 43 $self->{writer} = $self->_make_writer($out); 48 delete $self->{writer}; 75 $self->{writer}->( join '', @_ ); 154 TAP::Parser::YAMLish::Writer - Write YAMLish data 162 use TAP::Parser::YAMLish::Writer; 170 my $yw = TAP::Parser::YAMLish::Writer->new; 197 my $writer = TAP::Parser::YAMLish::Writer->new; 200 C<TAP::Parser::YAMLish::Writer> objec [all...] |
/openbsd-src/gnu/llvm/llvm/lib/DebugInfo/CodeView/ |
H A D | SimpleTypeSerializer.cpp | 18 static void addPadding(BinaryStreamWriter &Writer) { in addPadding() argument 19 uint32_t Align = Writer.getOffset() % 4; in addPadding() 26 cantFail(Writer.writeInteger(Pad)); in addPadding() 37 BinaryStreamWriter Writer(ScratchBuffer, support::little); in serialize() local 38 TypeRecordMapping Mapping(Writer); in serialize() 42 cantFail(Writer.writeObject(DummyPrefix)); in serialize() 51 addPadding(Writer); in serialize() 55 Prefix->RecordLen = Writer.getOffset() - sizeof(uint16_t); in serialize() 57 return {ScratchBuffer.data(), static_cast<size_t>(Writer.getOffset())}; in serialize()
|
H A D | CodeViewRecordIO.cpp | 84 return Writer->padToAlignment(Align); in padToAlignment() 109 if (auto EC = Writer->writeBytes(Bytes)) in mapByteVectorTail() 139 if (auto EC = Writer->writeInteger(TypeInd.getIndex())) in mapInteger() 218 if (auto EC = Writer->writeCString(S)) in mapStringZ() 243 if (auto EC = Writer->writeBytes(Guid.Guid)) in mapGuid() 341 if (auto EC = Writer->writeInteger<int16_t>(Value)) in writeEncodedSignedInteger() 345 if (auto EC = Writer->writeInteger<uint16_t>(LF_CHAR)) in writeEncodedSignedInteger() 347 if (auto EC = Writer->writeInteger<int8_t>(Value)) in writeEncodedSignedInteger() 351 if (auto EC = Writer->writeInteger<uint16_t>(LF_SHORT)) in writeEncodedSignedInteger() 353 if (auto EC = Writer->writeInteger<int16_t>(Value)) in writeEncodedSignedInteger() [all …]
|
H A D | SymbolSerializer.cpp | 23 : 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()
|
H A D | DebugStringTableSubsection.cpp | 64 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()
|
/openbsd-src/gnu/llvm/llvm/tools/llvm-xray/ |
H A D | xray-converter.cpp | 107 support::endian::Writer Writer(OS, support::endianness::little); in exportAsRAWv1() local 109 Writer.write(FH.Version); in exportAsRAWv1() 110 Writer.write(FH.Type); in exportAsRAWv1() 116 Writer.write(Bitfield); in exportAsRAWv1() 117 Writer.write(FH.CycleFrequency); in exportAsRAWv1() 121 Writer.write(Padding4B); in exportAsRAWv1() 122 Writer.write(Padding4B); in exportAsRAWv1() 123 Writer.write(Padding4B); in exportAsRAWv1() 124 Writer.write(Padding4B); in exportAsRAWv1() 132 Writer.write(R.RecordType); in exportAsRAWv1() [all …]
|
/openbsd-src/gnu/llvm/clang/include/clang/Serialization/ |
H A D | ASTRecordWriter.h | 31 ASTWriter *Writer; variable 62 : DataStreamBasicWriter(W.getASTContext()), Writer(&W), Record(&Record) {} in ASTRecordWriter() 67 : DataStreamBasicWriter(Parent.getASTContext()), Writer(Parent.Writer), in ASTRecordWriter() 93 uint64_t Offset = Writer->Stream.GetCurrentBitNo(); 95 Writer->Stream.EmitRecord(Code, *Record, Abbrev); 103 PrepareToEmit(Writer->Stream.GetCurrentBitNo()); 104 Writer->Stream.EmitRecord(Code, *Record, Abbrev); 105 return Writer->Stream.GetCurrentBitNo(); 138 return Writer->AddSourceLocation(Loc, *Record, Seq); 146 return Writer->AddSourceRange(Range, *Record, Seq); [all …]
|
/openbsd-src/gnu/llvm/llvm/lib/BinaryFormat/ |
H A D | MsgPackWriter.cpp | 1 //===- MsgPackWriter.cpp - Simple MsgPack writer ----------------*- C++ -*-===// 10 /// This file implements a MessagePack writer. 22 Writer::Writer(raw_ostream &OS, bool Compatible) in Writer() function in Writer 25 void Writer::writeNil() { EW.write(FirstByte::Nil); } in writeNil() 27 void Writer::write(bool b) { EW.write(b ? FirstByte::True : FirstByte::False); } in write() 29 void Writer::write(int64_t i) { in write() 62 void Writer::write(uint64_t u) { in write() 90 void Writer::write(double d) { in write() 103 void Writer::write(StringRef s) { in write() 123 void Writer::write(MemoryBufferRef Buffer) { in write() [all …]
|
/openbsd-src/regress/sys/fifofs/ |
H A D | fifotest.c | 192 pid_t writer; in eoftest() local 227 * The writer will sleep for a bit to give the reader time in eoftest() 230 writer = eof_writer(fifo, flags); in eoftest() 231 if (writer == -1) in eoftest() 237 dopoll(writer, fd, POLLIN|POLLOUT, "POLLIN|POLLOUT", timeout); in eoftest() 241 dopoll(writer, fd, POLLIN, "POLLIN", timeout); in eoftest() 245 dopoll(writer, fd, POLLOUT, "POLLOUT", timeout); in eoftest() 249 dopoll(writer, fd, 0, "(none)", timeout); in eoftest() 253 doselect(writer, fd, fd, timeout); in eoftest() 257 doselect(writer, fd, -1, timeout); in eoftest() [all …]
|
/openbsd-src/gnu/usr.bin/perl/cpan/Test-Harness/t/ |
H A D | state.t | 27 't/yamlish-writer.t', 43 't/yamlish-writer.t', 68 't/yamlish-writer.t', 76 't/yamlish-writer.t', 91 't/yamlish-writer.t', 102 't/yamlish-writer.t', 108 't/yamlish-writer.t', 124 't/yamlish-writer.t', 133 't/yamlish-writer.t', 143 't/yamlish-writer.t', [all …]
|
/openbsd-src/gnu/llvm/llvm/lib/ProfileData/ |
H A D | SampleProfWriter.cpp | 251 support::endian::Writer Writer(OS, support::little); in writeNameTable() local 253 Writer.write(MD5Hash(N)); in writeNameTable() 293 support::endian::Writer Writer(OS, support::little); in writeCSNameTableSection() local 612 support::endian::Writer Writer(*OutputStream, support::little); in writeFuncOffsetTable() local 613 Writer.write(FuncOffsetTableStart); in writeFuncOffsetTable() 680 support::endian::Writer Writer(*OutputStream, support::little); in allocSecHdrTable() local 682 Writer.write(static_cast<uint64_t>(SectionHdrLayout.size())); in allocSecHdrTable() 685 Writer.write(static_cast<uint64_t>(-1)); in allocSecHdrTable() 686 Writer.write(static_cast<uint64_t>(-1)); in allocSecHdrTable() 687 Writer.write(static_cast<uint64_t>(-1)); in allocSecHdrTable() [all …]
|
/openbsd-src/gnu/llvm/compiler-rt/lib/profile/ |
H A D | InstrProfilingPlatformLinux.c | 100 static int WriteOneBinaryId(ProfDataWriter *Writer, uint64_t BinaryIdLen, in WriteOneBinaryId() argument 108 if (Writer->Write(Writer, BinaryIdIOVec, in WriteOneBinaryId() 128 static int WriteBinaryIdForNote(ProfDataWriter *Writer, in WriteBinaryIdForNote() argument 138 if (Writer != NULL && WriteOneBinaryId(Writer, BinaryIdLen, BinaryIdData, in WriteBinaryIdForNote() 150 * If writer is given, write binary ids into profiles. 153 static int WriteBinaryIds(ProfDataWriter *Writer, const ElfW(Nhdr) * Note, in WriteBinaryIds() argument 157 int OneBinaryIdSize = WriteBinaryIdForNote(Writer, Note); in WriteBinaryIds() 172 * Write binary ids into profiles if writer is given. 176 COMPILER_RT_VISIBILITY int __llvm_write_binary_ids(ProfDataWriter *Writer) { in __llvm_write_binary_ids() argument 214 int BinaryIdsSize = WriteBinaryIds(Writer, Note, NotesEnd); in __llvm_write_binary_ids() [all …]
|
H A D | InstrProfilingInternal.h | 43 * low level writer callback function. 46 * 0, the write is skipped (the writer simply advances ElmSize*NumElm bytes). 103 * through the low level writer callback. 108 * callback by other high level writer methods such as buffered IO writer 109 * and profile data writer. */ 150 int lprofWriteData(ProfDataWriter *Writer, VPDataReaderType *VPDataReader, 152 int lprofWriteDataImpl(ProfDataWriter *Writer, 196 * Write binary ids into profiles if writer is given. 199 int __llvm_write_binary_ids(ProfDataWriter *Writer);
|
H A D | InstrProfilingWriter.c | 35 /* The buffer writer is responsible in keeping writer state 217 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 313 if (Writer->Write(Writer, IOVec, sizeof(IOVec) / sizeof(*IOVec))) in lprofWriteDataImpl() 317 if (__llvm_write_binary_ids(Writer) == -1) in lprofWriteDataImpl() 330 if (Writer->Write(Writer, IOVecData, sizeof(IOVecData) / sizeof(*IOVecData))) in lprofWriteDataImpl() 337 return writeValueProfData(Writer, VPDataReader, DataBegin, DataEnd); in lprofWriteDataImpl()
|
/openbsd-src/gnu/llvm/llvm/include/llvm/DebugInfo/CodeView/ |
H A D | CodeViewRecordIO.h | 46 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
|