[lldb-vscode] Use a DenseMap to pacify overly aggressive linters

Some linters get rather upset upon seeing
`std::unordered_map<const char*`, because it looks like a map of
strings but isn't. lldb uses interned strings so this is not a problem.
DenseMap is a better data structure for this anyways, so use that
instead.
This commit is contained in:
Benjamin Kramer 2021-04-22 13:01:16 +02:00
parent e5d844b587
commit edc869cb57
1 changed files with 2 additions and 2 deletions

View File

@ -41,10 +41,10 @@
#include <set>
#include <sstream>
#include <thread>
#include <unordered_map>
#include <vector>
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
@ -2931,7 +2931,7 @@ void request_variables(const llvm::json::Object &request) {
const int64_t end_idx = start_idx + ((count == 0) ? num_children : count);
// We first find out which variable names are duplicated
std::unordered_map<const char *, int> variable_name_counts;
llvm::DenseMap<const char *, int> variable_name_counts;
for (auto i = start_idx; i < end_idx; ++i) {
lldb::SBValue variable = g_vsc.variables.GetValueAtIndex(i);
if (!variable.IsValid())