diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-26 05:01:35 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-26 05:01:35 +0000 |
commit | 50188c1f42c122640ab9ccac2134acf371c26b2c (patch) | |
tree | 05539e5a83063a0eeda3c9211dfb8153cc750f0c /include/llvm/Support/FileSystem.h | |
parent | 2c63b27e9f36dddc2660639026b19e606ad52cd0 (diff) | |
download | external_llvm-50188c1f42c122640ab9ccac2134acf371c26b2c.zip external_llvm-50188c1f42c122640ab9ccac2134acf371c26b2c.tar.gz external_llvm-50188c1f42c122640ab9ccac2134acf371c26b2c.tar.bz2 |
Port GetMainExecutable over to PathV2.
I will remove the V1 version as soon as I change clang in the next commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184914 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/FileSystem.h')
-rw-r--r-- | include/llvm/Support/FileSystem.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h index 5c514dc..699bf4b 100644 --- a/include/llvm/Support/FileSystem.h +++ b/include/llvm/Support/FileSystem.h @@ -696,7 +696,10 @@ error_code map_file_pages(const Twine &path, off_t file_offset, size_t size, /// platform specific error_code. error_code unmap_file_pages(void *base, size_t size); - +/// Return the path to the main executable, given the value of argv[0] from +/// program startup and the address of main itself. In extremis, this function +/// may fail and return an empty path. +std::string getMainExecutable(const char *argv0, void *MainExecAddr); /// @} /// @name Iterators |