[llvm-commits] [llvm] r52288 - in /llvm/trunk/lib/System: Path.cpp Unix/Path.inc Win32/Path.inc

Matthijs Kooijman matthijs at stdin.nl
Mon Jun 16 01:23:29 PDT 2008


Hi Argiris,


> There are a couple of others that are also duplicated, like 
> Path::getBasename().
IMHO code duplication should be prevented as much as possible. You probably
did well to make things consistent in this case, but perhaps we should wonder
if we shouldn't prevent all of this duplication.

> I assumed that the convention is that if a method deals with directory
> separators, it is getting into platform implementation details and it should
> have separate platform implementations, even if the code turns out to be
> identical (currently the Win32 path implementation uses '/' as directory
> separator but it could as easily use '\' instead).
Wouldn't it be better to simply make the path separator configurable (ie, have
a method that returns it?)

Anyone with a better view of why things are like this that can comment?

Gr.

Matthijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080616/a2ef0685/attachment.sig>


More information about the llvm-commits mailing list