Enable -Wunreachable-code-return
[folly.git] / folly / experimental / symbolizer / ElfCache.h
index eb01d210f81a515d515d6cb8c642fc67cde2d151..378baa205238b7a796edf5018cf0fe9c64751e18 100644 (file)
 #include <boost/intrusive/list.hpp>
 #include <glog/logging.h>
 
+#include <folly/Hash.h>
+#include <folly/Range.h>
 #include <folly/experimental/symbolizer/Elf.h>
 
 namespace folly { namespace symbolizer {
 
+/**
+ * Number of ELF files loaded by the dynamic loader.
+ */
+size_t countLoadedElfFiles();
+
 class ElfCacheBase {
  public:
   virtual std::shared_ptr<ElfFile> getFile(StringPiece path) = 0;
@@ -116,10 +123,7 @@ class ElfCache : public ElfCacheBase {
   static std::shared_ptr<ElfFile> filePtr(const std::shared_ptr<Entry>& e);
 
   size_t capacity_;
-  std::unordered_map<
-    StringPiece,
-    std::shared_ptr<Entry>,
-    StringPieceHash> files_;
+  std::unordered_map<StringPiece, std::shared_ptr<Entry>, Hash> files_;
 
   typedef boost::intrusive::list<
       Entry,