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

Method skipPadding

lib/Bytecode/Reader/BytecodeReader.cpp:251–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249 size_t currentOffset() const { return offset; }
250
251 LogicalResult skipPadding(uint64_t alignment) {
252 if (alignment < 2)
253 return success();
254 if (remaining() == 0)
255 return failure();
256 size_t offset_position = this->currentOffset();
257 size_t padding = (alignment - (offset_position % alignment)) % alignment;
258 if (remaining() < padding)
259 return failure();
260 return skip(padding);
261 }
262
263 // Emits an error message associated with the current reader offset.
264 // TODO: Generate a location based on the current offset instead of

Callers 5

parseSectionHeaderFunction · 0.80
parseStringSectionFunction · 0.80
parseTypeSectionFunction · 0.80
parseConstantSectionFunction · 0.80
parseDebugSectionFunction · 0.80

Calls 1

currentOffsetMethod · 0.95

Tested by

no test coverage detected