Support/PathV1: Deprecate getLast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122116 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael J. Spencer
2010-12-18 00:19:10 +00:00
parent 57e9104318
commit b3127bb06a
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -505,7 +505,7 @@ void cl::ParseCommandLineOptions(int argc, char **argv,
}
// Copy the program name into ProgName, making sure not to overflow it.
std::string ProgName = sys::Path(argv[0]).getLast();
std::string ProgName = sys::path::filename(argv[0]);
size_t Len = std::min(ProgName.size(), size_t(79));
memcpy(ProgramName, ProgName.data(), Len);
ProgramName[Len] = '\0';