[llvm-commits] [llvm] r52288 - in /llvm/trunk/lib/System: Path.cpp Unix/Path.inc Win32/Path.inc
Argiris Kirtzidis
akyrtzi at gmail.com
Mon Jun 16 01:18:35 PDT 2008
Hi Matthijs,
Matthijs Kooijman wrote:
> why is the getSuffix code now duplicated for win32 and unix? Unless I'm very
> much mistaken, the code is identical. The old code was not duplicated (at
> least, you only removed one copy in your patch), so why must the new code be?
>
There are a couple of others that are also duplicated, like
Path::getBasename().
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).
Does this seem reasonable ?
-Argiris
More information about the llvm-commits
mailing list