mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-02 02:14:23 +00:00
"This patch implements the method with the GetModuleFileName function for windows."
Patch by Benjamin Kramer! llvm-svn: 73379
This commit is contained in:
parent
04717d5e84
commit
9e81498d2d
@ -248,7 +248,9 @@ Path::GetCurrentDirectory() {
|
||||
/// GetMainExecutable - Return the path to the main executable, given the
|
||||
/// value of argv[0] from program startup.
|
||||
Path Path::GetMainExecutable(const char *argv0, void *MainAddr) {
|
||||
return Path();
|
||||
char pathname[MAX_PATH];
|
||||
DWORD ret = ::GetModuleFileNameA(NULL, pathname, MAX_PATH);
|
||||
return ret != MAX_PATH ? Path(pathname) : Path();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user