]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use gdb set and map in source_cache
authorTom Tromey <tom@tromey.com>
Mon, 24 Feb 2025 22:35:04 +0000 (15:35 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 11 Mar 2025 14:31:43 +0000 (08:31 -0600)
This changes source_cache to use gdb::unordered_map and
gdb::unordered_set rather than the std:: variants.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/source-cache.h

index 35eeb1cb204710d375469b3e4e7b483cefce355c..03f4b79778f9a5b1117681d2cfd659296d561370 100644 (file)
@@ -19,8 +19,8 @@
 #ifndef GDB_SOURCE_CACHE_H
 #define GDB_SOURCE_CACHE_H
 
-#include <unordered_map>
-#include <unordered_set>
+#include "gdbsupport/unordered_map.h"
+#include "gdbsupport/unordered_set.h"
 
 /* This caches two things related to source files.
 
@@ -95,10 +95,10 @@ private:
 
   /* The file offset cache.  The key is the full name of the source
      file.  */
-  std::unordered_map<std::string, std::vector<off_t>> m_offset_cache;
+  gdb::unordered_map<std::string, std::vector<off_t>> m_offset_cache;
 
   /* The list of files where styling failed.  */
-  std::unordered_set<std::string> m_no_styling_files;
+  gdb::unordered_set<std::string> m_no_styling_files;
 };
 
 /* The global source cache.  */