[LLVMbugs] [Bug 4764] New: rewrite sys::Path
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Aug 23 21:56:33 PDT 2009
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: unassignedbugs at nondot.org
ReportedBy: clattner at apple.com
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list