From b7ce678aec90c0fd5dcd445acb0c9f3e3e42ef36 Mon Sep 17 00:00:00 2001 From: Joshua Peraza Date: Thu, 20 May 2021 15:26:09 -0700 Subject: [PATCH] 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 --- src/common/dwarf/line_state_machine.h | 2 ++ src/common/md5.h | 1 + src/common/unordered.h | 8 +------- src/common/using_std_string.h | 1 + 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/common/dwarf/line_state_machine.h b/src/common/dwarf/line_state_machine.h index fc301c76..2e8c005b 100644 --- a/src/common/dwarf/line_state_machine.h +++ b/src/common/dwarf/line_state_machine.h @@ -30,6 +30,8 @@ #ifndef COMMON_DWARF_LINE_STATE_MACHINE_H__ #define COMMON_DWARF_LINE_STATE_MACHINE_H__ +#include + namespace dwarf2reader { // This is the format of a DWARF2/3 line state machine that we process diff --git a/src/common/md5.h b/src/common/md5.h index 2ab0ab95..1b478fea 100644 --- a/src/common/md5.h +++ b/src/common/md5.h @@ -3,6 +3,7 @@ #ifndef COMMON_MD5_H__ #define COMMON_MD5_H__ +#include #include namespace google_breakpad { diff --git a/src/common/unordered.h b/src/common/unordered.h index c9cbd585..0be7f48f 100644 --- a/src/common/unordered.h +++ b/src/common/unordered.h @@ -46,17 +46,11 @@ struct unordered_map : public __gnu_cxx::hash_map {}; template > struct unordered_set : public __gnu_cxx::hash_set {}; -#elif defined(_LIBCPP_VERSION) // c++11 +#else #include #include using std::unordered_map; using std::unordered_set; - -#else // Fallback to tr1::unordered -#include -#include -using std::tr1::unordered_map; -using std::tr1::unordered_set; #endif #endif // COMMON_UNORDERED_H_ diff --git a/src/common/using_std_string.h b/src/common/using_std_string.h index 13c1da59..f0e1aed9 100644 --- a/src/common/using_std_string.h +++ b/src/common/using_std_string.h @@ -55,6 +55,7 @@ #ifdef HAS_GLOBAL_STRING typedef ::string google_breakpad_string; #else +#include using std::string; typedef std::string google_breakpad_string; #endif