compnerd added inline comments.

================
Comment at: include/lldb/Target/LanguageRuntime.h:137
 
+  virtual DeclVendor *GetDeclVendor() { return nullptr; }
+
----------------
Can this not be `const`?  Seems like retrieving the vendor should not mutate 
the runtime.


================
Comment at: source/API/SBTarget.cpp:1850
+    // Didn't find the type in the symbols; Try the loaded language runtimes
+    if (ProcessSP process_sp = target_sp->GetProcessSP()) {
+      for (auto *runtime : process_sp->GetLanguageRuntimes()) {
----------------
`auto` should be fine, the type is spelt out.



================
Comment at: source/API/SBTarget.cpp:1851
+    if (ProcessSP process_sp = target_sp->GetProcessSP()) {
+      for (auto *runtime : process_sp->GetLanguageRuntimes()) {
+        if (auto vendor = runtime->GetDeclVendor()) {
----------------
Can this not be `const auto *runtime`?


================
Comment at: source/API/SBTarget.cpp:1912
+    // Try the loaded language runtimes
+    if (ProcessSP process_sp = target_sp->GetProcessSP()) {
+      for (auto *runtime : process_sp->GetLanguageRuntimes()) {
----------------
`auto` should be fine, the type is spelt out in the method.


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

https://reviews.llvm.org/D63622



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

Reply via email to