ΒΆstd::string getAbsolutePath(llvm::StringRef File)
std::string getAbsolutePath(llvm::StringRef File)
Description
Returns the absolute path of \c File, by prepending it with the current directory if \c File is not absolute. Otherwise returns \c File. If 'File' starts with "./", the returned path will not contain the "./". Otherwise, the returned path will contain the literal path-concatenation of the current directory and \c File. The difference to llvm::sys::fs::make_absolute is the canonicalization this does by removing "./" and computing native paths.
Declared at: clang/include/clang/Tooling/Tooling.h:480
Parameters
- llvm::StringRef File
- Either an absolute or relative path.