http://llvm.org/bugs/show_bug.cgi?id=4764

           Summary: rewrite sys::Path
           Product: libraries
           Version: 1.0
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: code-cleanup
          Severity: normal
          Priority: P2
         Component: System Library
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


sys::Path has some useful functionality but its current implementation is bad
in a number of ways.  As with many of the "sys" classes, it conflates "system
abstraction" with "helpful utility class".  I think that sys::Path should be
distilled down to a collection of a bunch of simple static functions (e.g.
getLast) that take a StringRef and return a StringRef.

Right now sys::Path contains an std::string, which forces all clients to deal
with std::strings really poor performance.  Many clients are using sys::Path
just to remove an extension from a filename: this API forces a bunch of nasty
memory traffic.

The API should also be thinned down.  Path.h shouldn't pull in <set> and
ideally not <vector> or <string> either.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to