di-file =: DebugTag[DIFile] fileNameIndex[varint] - StringAttr directoryIndex[varint] - StringAttr
| 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] |
nothing calls this directly
no test coverage detected