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

Method getString

lib/Bytecode/Reader/BytecodeReader.cpp:223–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221 }
222
223 LogicalResult getString(uint64_t index, StringRef &result,
224 MLIRContext &context) const {
225 if (index >= stringOffsets.size())
226 return ::emitError(UnknownLoc::get(&context))
227 << "string index " << index << " out of bounds";
228 uint32_t start = stringOffsets[index];
229 uint32_t end = (index + 1 < stringOffsets.size())
230 ? stringOffsets[index + 1]
231 : static_cast<uint32_t>(stringData.size());
232 result = stringData.substr(start, end - start);
233 return success();
234 }
235
236 /// Reads a string index and returns the corresponding StringRef.
237 LogicalResult readAndGetString(StringRef &result) {

Callers 3

createFunctionFunction · 0.80
parseProducerSectionFunction · 0.80
createGlobalFunction · 0.80

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected