fix includes and remove tr1::unordered_map

_LIBCPP_VERSION doesn't reliably detect c++11.

Change-Id: I1adb4303269885e4a08648f049e14b244a2fde50
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2911693
Reviewed-by: Nelson Billing <nbilling@google.com>
This commit is contained in:
Joshua Peraza 2021-05-20 15:26:09 -07:00
parent 0e86eebc5a
commit b7ce678aec
4 changed files with 5 additions and 7 deletions

View file

@ -30,6 +30,8 @@
#ifndef COMMON_DWARF_LINE_STATE_MACHINE_H__
#define COMMON_DWARF_LINE_STATE_MACHINE_H__
#include <stdint.h>
namespace dwarf2reader {
// This is the format of a DWARF2/3 line state machine that we process

View file

@ -3,6 +3,7 @@
#ifndef COMMON_MD5_H__
#define COMMON_MD5_H__
#include <stddef.h>
#include <stdint.h>
namespace google_breakpad {

View file

@ -46,17 +46,11 @@ struct unordered_map : public __gnu_cxx::hash_map<T, U, H> {};
template <class T, class H = __gnu_cxx::hash<T> >
struct unordered_set : public __gnu_cxx::hash_set<T, H> {};
#elif defined(_LIBCPP_VERSION) // c++11
#else
#include <unordered_map>
#include <unordered_set>
using std::unordered_map;
using std::unordered_set;
#else // Fallback to tr1::unordered
#include <tr1/unordered_map>
#include <tr1/unordered_set>
using std::tr1::unordered_map;
using std::tr1::unordered_set;
#endif
#endif // COMMON_UNORDERED_H_

View file

@ -55,6 +55,7 @@
#ifdef HAS_GLOBAL_STRING
typedef ::string google_breakpad_string;
#else
#include <string>
using std::string;
typedef std::string google_breakpad_string;
#endif