MCPcopy Create free account
hub / github.com/NVIDIA/cuda-tile / writeSectionHeader

Function writeSectionHeader

lib/Bytecode/Writer/BytecodeWriter.cpp:199–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197//===----------------------------------------------------------------------===//
198
199static void writeSectionHeader(raw_ostream &stream, uint8_t sectionID,
200 uint64_t length, uint64_t alignment) {
201 EncodingWriter writer(stream);
202 uint8_t idAndIsAligned = sectionID & 0x7F;
203 if (alignment > 1)
204 idAndIsAligned |= 0x80;
205 writer.writeByte(idAndIsAligned);
206 writer.writeVarInt(length);
207 if (alignment > 1) {
208 writer.writeVarInt(alignment);
209 writer.alignTo(alignment);
210 }
211}
212
213/// Helper function to serialize an APInt.
214static void writeAPInt(const APInt &apInt, EncodingWriter &writer) {

Callers 7

writeStringSectionMethod · 0.85
writeTypeSectionMethod · 0.85
writeConstantSectionMethod · 0.85
writeDebugInfoSectionMethod · 0.85
writeGlobalSectionFunction · 0.85
writeProducerSectionFunction · 0.85

Calls 3

writeByteMethod · 0.80
writeVarIntMethod · 0.80
alignToMethod · 0.80

Tested by

no test coverage detected