[PATCH] Support: Provide a function to get the home directory of an arbitrary user

Aaron Ballman aaron at aaronballman.com
Fri Aug 1 11:07:23 PDT 2014


On Fri, Aug 1, 2014 at 2:03 PM, Zachary Turner <zturner at google.com> wrote:
> Not sure it's possible without putting an #ifdef in the cross-platform
> Path.h, which would be ugly.  The other alternative I guess is to just kill
> the entire patch, and use the platform-specific logic in whatever tool needs
> it.

I lean towards putting the platform-specific logic in whatever tool
needs it, unless it's needed in several different tools. I agree that
a #if would be ugly, but at the same time, it may make sense for
certain non-cross-platform concepts like this (presuming they need to
be in this library). We could always have a PathUnix.h that gets
#included from Path.h and uses header include guards to only provide
symbols on *nix systems.

~Aaron



More information about the llvm-commits mailing list