This is an archive of the discontinued LLVM Phabricator instance.

lld/COFF: Simplify getOutputPath() using sys::path functions.
ClosedPublic

Authored by thakis on Oct 25 2019, 8:12 PM.

Details

Summary

Also mention "basename" and "dirname" in Path.h since I tried
to find these functions by looking for these strings. It might
help others find them faster if the comments contain these strings.

No behavior change.

Diff Detail

Event Timeline

thakis created this revision.Oct 25 2019, 8:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2019, 8:12 PM
ruiu accepted this revision.Oct 27 2019, 7:19 PM

LGTM

lld/COFF/Driver.cpp
107–108

It seems that you can simplify this further to sys::path::stem(path) + (config->dll ? ".dll" : ".exe"), but I'm fine with this too.

This revision is now accepted and ready to land.Oct 27 2019, 7:19 PM
This revision was automatically updated to reflect the committed changes.
thakis marked an inline comment as done.
thakis added inline comments.Oct 28 2019, 7:40 AM
lld/COFF/Driver.cpp
107–108

That's even nicer, thanks.