aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/Windows/PathV2.inc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/Windows/PathV2.inc')
-rw-r--r--lib/Support/Windows/PathV2.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Support/Windows/PathV2.inc b/lib/Support/Windows/PathV2.inc
index 0c12bb4..6987e5f 100644
--- a/lib/Support/Windows/PathV2.inc
+++ b/lib/Support/Windows/PathV2.inc
@@ -128,6 +128,13 @@ namespace llvm {
namespace sys {
namespace fs {
+std::string getMainExecutable(const char *argv0, void *MainExecAddr) {
+ char pathname[MAX_PATH];
+ DWORD ret = ::GetModuleFileNameA(NULL, pathname, MAX_PATH);
+ return ret != MAX_PATH ? pathname : "";
+}
+
+
TimeValue file_status::getLastModificationTime() const {
ULARGE_INTEGER UI;
UI.LowPart = LastWriteTimeLow;