[llvm] [llvm][support] Refactor symlink handling and add readlink (PR #184256)

Steven Wu via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 08:57:03 PST 2026


================
@@ -259,7 +259,7 @@ std::string getMainExecutable(const char *argv0, void *MainAddr) {
   const char *aPath = "/proc/self/exe";
   if (sys::fs::exists(aPath)) {
     // /proc is not always mounted under Linux (chroot for example).
-    ssize_t len = readlink(aPath, exe_path, sizeof(exe_path));
+    ssize_t len = ::readlink(aPath, exe_path, sizeof(exe_path));
----------------
cachemeifyoucan wrote:

Start `BufSize` from `dest.capacity()` might be a good idea. 

https://github.com/llvm/llvm-project/pull/184256


More information about the llvm-commits mailing list