This is an archive of the discontinued LLVM Phabricator instance.

[LLD] [COFF] Fix reporting duplicate errors for absolute symbols
ClosedPublic

Authored by mstorsjo on Dec 18 2019, 2:04 PM.

Details

Summary

Previously this caused crashes in the reportDuplicate method.

A DefinedAbsolute doesn't have any InputFile attached to it, so we can't report the file for the original symbol.

We could add an InputFile argument to SymbolTable::addAbsolute only for the sake of error reporting, but even then it'd be assymetrical, only pointing out the file containing the new conflicting definition, not the original one.

Diff Detail

Event Timeline

mstorsjo created this revision.Dec 18 2019, 2:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 18 2019, 2:04 PM
ruiu accepted this revision.Dec 18 2019, 7:58 PM

LGTM

This revision is now accepted and ready to land.Dec 18 2019, 7:58 PM
This revision was automatically updated to reflect the committed changes.