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

Method parseDIFile

lib/Bytecode/Reader/BytecodeReader.cpp:929–944  ·  view source on GitHub ↗

di-file =: DebugTag[DIFile] fileNameIndex[varint] - StringAttr directoryIndex[varint] - StringAttr

Source from the content-addressed store, hash-verified

927 // fileNameIndex[varint] - StringAttr
928 // directoryIndex[varint] - StringAttr
929 LogicalResult parseDIFile(EncodingReader &reader, Attribute &diFile) {
930 StringRef nameStr;
931 if (failed(reader.readAndGetString(nameStr)))
932 return reader.emitError()
933 << "failed to read file name attribute when parsing DIFileAttr";
934 StringAttr name = StringAttr::get(&context, nameStr);
935
936 StringRef directoryStr;
937 if (failed(reader.readAndGetString(directoryStr)))
938 return reader.emitError()
939 << "failed to read directory attribute when parsing DIFileAttr";
940 StringAttr directory = StringAttr::get(&context, directoryStr);
941
942 diFile = DIFileAttr::get(&context, name, directory);
943 return success();
944 }
945
946 // di-lexical-block =:
947 // DebugTag[DILexicalBlock]

Callers

nothing calls this directly

Calls 2

readAndGetStringMethod · 0.80
emitErrorMethod · 0.80

Tested by

no test coverage detected