llvm.org GIT mirror llvm / b3127bb
Support/PathV1: Deprecate getLast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122116 91177308-0d34-0410-b5e6-96231b3b80d8 Michael J. Spencer 8 years ago
2 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
262262 /// path name is returned (i.e. same as toString).
263263 /// @returns StringRef containing the last component of the path name.
264264 /// @brief Returns the last component of the path name.
265 StringRef getLast() const;
265 LLVM_ATTRIBUTE_DEPRECATED(
266 StringRef getLast() const,
267 LLVMV_PATH_DEPRECATED_MSG);
266268
267269 /// This function strips off the path and suffix of the file or directory
268270 /// name and returns just the basename. For example /a/foo.bar would cause
504504 }
505505
506506 // Copy the program name into ProgName, making sure not to overflow it.
507 std::string ProgName = sys::Path(argv[0]).getLast();
507 std::string ProgName = sys::path::filename(argv[0]);
508508 size_t Len = std::min(ProgName.size(), size_t(79));
509509 memcpy(ProgramName, ProgName.data(), Len);
510510 ProgramName[Len] = '\0';