This is an archive of the discontinued LLVM Phabricator instance.

[lldb][PDB] Rename GetDeclarationForSymbol() -> AddSourceInfoToDecl()
ClosedPublic

Authored by sgraenitz on Mar 17 2023, 4:35 AM.

Details

Summary

The old name of this function was confusing for me, when I started working on the PDB parser. The new name clearifies that the function adds file, line and column (typically referred as source info) and indicates that the information is stored in the provided decl parameter.

Diff Detail

Event Timeline

sgraenitz created this revision.Mar 17 2023, 4:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 17 2023, 4:35 AM
sgraenitz requested review of this revision.Mar 17 2023, 4:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 17 2023, 4:35 AM
DavidSpickett added a subscriber: DavidSpickett.

Agreed, the original name sounds like a const method.

Although I can see why it might have been this way because before optional there was no way to have a null return. So it's return a bool and a ref to the result.

DavidSpickett accepted this revision.Mar 17 2023, 4:57 AM
This revision is now accepted and ready to land.Mar 17 2023, 4:57 AM

Thanks for the quick response!