[Lldb-commits] [PATCH] D101131: [lldb-vscode] Follow up of D99989 - store some strings more safely

walter erquinigo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 23 10:28:56 PDT 2021


wallace added inline comments.


================
Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2934
     // We first find out which variable names are duplicated
-    llvm::DenseMap<const char *, int> variable_name_counts;
+    std::map<std::string, int> variable_name_counts;
     for (auto i = start_idx; i < end_idx; ++i) {
----------------
JDevlieghere wrote:
> Have you considered an`llvm::StringMap`, it should be more performant. 
I've been reading https://llvm.org/devmtg/2014-04/PDFs/LightningTalks/data_structure_llvm.pdf and it seems that it's not more performant speed-wise. I imagine it's more performance space-wise, but here I mostly care about time.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101131



More information about the lldb-commits mailing list