labath added inline comments.

================
Comment at: source/Host/linux/Host.cpp:166
+  llvm::SmallString<64> ProcExe;
+  (llvm::Twine("/proc/") + llvm::Twine(pid) + "/exe").toVector(ProcExe);
+  llvm::SmallString<0> ExePath;
----------------
labath wrote:
> zturner wrote:
> > You can make this a bit shorter with `((llvm::Twine("/proc") + pid) + 
> > "/exe").toVector(ProcExe);`
> ok
Actually, that doesn't work as Twine's integral constructors are explicit.


================
Comment at: source/Host/linux/Host.cpp:167
+  (llvm::Twine("/proc/") + llvm::Twine(pid) + "/exe").toVector(ProcExe);
+  llvm::SmallString<0> ExePath;
+  ExePath.assign(PATH_MAX, '\0');
----------------
eugene wrote:
> std::string? Do we have any benefits from using 0 size stack allocated string 
> here?
Not really, I was trying to be consistent with the `ProcExe` variable above, 
but I did not want to allocate PATH_MAX on the stack. I'll change it to 
std::string, hopefully that looks less weird.


https://reviews.llvm.org/D30942



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to