[Lldb-commits] [PATCH] D61233: Refactor ObjectFile::GetSDKVersion

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 29 12:32:33 PDT 2019


aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.

Awesome. I should have done that right away. This isn't super important, but I feel like just returning a vector (with potentially zero elements would be just as good) and the Optional doesn't add much value.



================
Comment at: lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp:211
                           "SDKs/MacOSX%u.%u.sdk",
-                          xcode_contents_path.c_str(), versions[0],
-                          versions[1]);
+                          xcode_contents_path.c_str(), versions->at(0),
+                          versions->at(1));
----------------
For my own education, why is this preferred over `versions[0]`? Because of Optional's `operator->`?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61233/new/

https://reviews.llvm.org/D61233





More information about the lldb-commits mailing list