[Lldb-commits] [lldb] (lldb) (minor) Correctly fix a usage of `PATH_MAX` (PR #104502)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 15 14:06:31 PDT 2024


================
@@ -54,7 +53,7 @@ RealpathPrefixes::ResolveSymlinks(const FileSpec &file_spec) {
       LLDB_LOGF(log, "Realpath'ing support file %s", file_spec_path.c_str());
 
       // One prefix matched. Try to realpath.
-      llvm::SmallString<PATH_MAX> buff;
+      llvm::SmallString<1024> buff;
----------------
JDevlieghere wrote:

Should we give this a smaller initial value? Looks like most `SmallString`s in LLDB use either 64, 128 or 256. Maybe we should unify this and have a `lldb::PathSmallString` that typedefs to a reasonable value. 

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


More information about the lldb-commits mailing list