This is an NFC modernization refactoring that replaces the combination of a bool return + reference argument, with an Optional return value.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lldb/source/Core/Module.cpp | ||
---|---|---|
1604 | Why not also have this return an Optional? |
lldb/source/Core/Module.cpp | ||
---|---|---|
1604 | That would be perfectly reasonable. I'll add a review for that patch. |
LGTM.
If the return type of the new function is not too awful to type, maybe don't use auto? It says it's returning a path, which is usually a string, not a FileSpec... But that's more a matter of taste.
lldb/source/Core/Module.cpp | ||
---|---|---|
1607–1611 | RemapPath doesn't make it obvious you are getting a FileSpec back. Is the actual return something awful to type? |
if the return type of the new function is not too awful to type, maybe don't use auto? It says it's returning a path, which is usually a string, not a FileSpec... But that's more a matter of taste.
I think that's generally advice. In this particular case, the code gets deleted by a subsequent patch in this stack anyway.
Why not also have this return an Optional?