[Lldb-commits] [PATCH] D32626: Make the ELF symbol demangling loop order independent

Scott Smith via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 27 16:50:00 PDT 2017


scott.smith added a comment.

I welcome any suggestions on how to update the comments near the code I touched.  I can make the code functionally the same, but it doesn't mean I know why it's doing what it's doing :-)



================
Comment at: source/Symbol/Symtab.cpp:382
-          entry.cstring = mangled_name_to_index.GetCStringAtIndex(i);
-          if (symbol_contexts[entry.value] &&
-              class_contexts.find(symbol_contexts[entry.value]) !=
----------------
Note the old code checked that symbol_contexts[] (aka const_context above) is "true."  However, because of the code above, we would never get here unless it is true.  So I removed the check.


================
Comment at: source/Symbol/Symtab.cpp:385
-                  class_contexts.end()) {
-            m_method_to_index.Append(entry);
-          } else {
----------------
Note that adding to m_method_to_index happened in both code paths in the old code, so I moved it up to the main loop.


Repository:
  rL LLVM

https://reviews.llvm.org/D32626





More information about the lldb-commits mailing list