There is no sense to use Name in these lines as it is not initialized yet.
Diff Detail
Event Timeline
The first line cannot fire with current sources, it's more like a redundant safety check.
The second line can fire if an obj file is invalid and contains sections with invalid names. I can write a test for this case if it's worth it.
LGTM
lld/trunk/test/COFF/invalid-obj.test | ||
---|---|---|
4 | Does this actually contain the trailing colon? |
Could you please commit it as I don't have write permissions?
lld/trunk/test/COFF/invalid-obj.test | ||
---|---|---|
4 | The full message is "getSectionName failed: #1: Invalid data was encountered while parsing the file", but the last part comes from the other place, so I decided to not add it here to make the test less fragile. |
Does this actually contain the trailing colon?