mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Add GetCurrentDirectory back.
It looks like clang-tools-extra/unittests/cpp11-migrate/TransformTest.cpp depends on the behaviour of the old one on Windows. Maybe a difference between GetCurrentDirectoryA and GetCurrentDirectoryW? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184009 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -185,6 +185,17 @@ Path::GetTemporaryDirectory(std::string *ErrMsg) {
|
||||
#endif
|
||||
}
|
||||
|
||||
Path
|
||||
Path::GetCurrentDirectory() {
|
||||
char pathname[MAXPATHLEN];
|
||||
if (!getcwd(pathname, MAXPATHLEN)) {
|
||||
assert(false && "Could not query current working directory.");
|
||||
return Path();
|
||||
}
|
||||
|
||||
return Path(pathname);
|
||||
}
|
||||
|
||||
#if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__Bitrig__) || \
|
||||
defined(__OpenBSD__) || defined(__minix) || defined(__FreeBSD_kernel__) || \
|
||||
defined(__linux__) || defined(__CYGWIN__)
|
||||
|
||||
Reference in New Issue
Block a user