aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorIvan Penkov <ivanpe@chromium.org>2016-11-07 19:37:19 -0500
committerIvan Penkov <ivanpe@chromium.org>2016-11-08 01:29:06 +0000
commit2f6cb866d615d6240a18c7535c994c6bb93b1ba5 (patch)
tree7efbca7102660952da22d328885af727cb432c39 /src/common
parentBasic handling of CIE version 4 in dwarf reading (diff)
downloadbreakpad-2f6cb866d615d6240a18c7535c994c6bb93b1ba5.tar.xz
Allow compiling the google-breakpad code using a global ::string class instead of std::string.
For more details take a look at common/using_std_string.h BUG= Change-Id: Ifebfc57f691ef3a3bef8cfed7106c567985edffc Reviewed-on: https://chromium-review.googlesource.com/399738 Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/dwarf/elf_reader.h2
-rw-r--r--src/common/dwarf_cfi_to_module.cc2
-rw-r--r--src/common/dwarf_cfi_to_module.h4
-rw-r--r--src/common/dwarf_cu_to_module.cc2
-rw-r--r--src/common/language.cc4
-rw-r--r--src/common/language.h2
-rw-r--r--src/common/linux/file_id.h7
7 files changed, 12 insertions, 11 deletions
diff --git a/src/common/dwarf/elf_reader.h b/src/common/dwarf/elf_reader.h
index 07477341..b1bb67a8 100644
--- a/src/common/dwarf/elf_reader.h
+++ b/src/common/dwarf/elf_reader.h
@@ -19,8 +19,8 @@
#include <vector>
#include "common/dwarf/types.h"
+#include "common/using_std_string.h"
-using std::string;
using std::vector;
using std::pair;
diff --git a/src/common/dwarf_cfi_to_module.cc b/src/common/dwarf_cfi_to_module.cc
index 1bf1d96d..bd298a2f 100644
--- a/src/common/dwarf_cfi_to_module.cc
+++ b/src/common/dwarf_cfi_to_module.cc
@@ -195,7 +195,7 @@ void DwarfCFIToModule::Record(Module::Address address, int reg,
// Place the name in our global set of strings, and then use the string
// from the set. Even though the assignment looks like a copy, all the
- // major std::string implementations use reference counting internally,
+ // major string implementations use reference counting internally,
// so the effect is to have all our data structures share copies of rules
// whenever possible. Since register names are drawn from a
// vector<string>, register names are already shared.
diff --git a/src/common/dwarf_cfi_to_module.h b/src/common/dwarf_cfi_to_module.h
index 084b8f5a..a5302e15 100644
--- a/src/common/dwarf_cfi_to_module.h
+++ b/src/common/dwarf_cfi_to_module.h
@@ -181,7 +181,7 @@ class DwarfCFIToModule: public CallFrameInfo::Handler {
// The names of the return address and canonical frame address. Putting
// these here instead of using string literals allows us to share their
- // texts in reference-counted std::string implementations (all the
+ // texts in reference-counted string implementations (all the
// popular ones). Many, many rules cite these strings.
string cfa_name_, ra_name_;
@@ -189,7 +189,7 @@ class DwarfCFIToModule: public CallFrameInfo::Handler {
// our data structures, insert it into this set, and then use the string
// from the set.
//
- // Because std::string uses reference counting internally, simply using
+ // Because string uses reference counting internally, simply using
// strings from this set, even if passed by value, assigned, or held
// directly in structures and containers (map<string, ...>, for example),
// causes those strings to share a single instance of each distinct piece
diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc
index 8d874366..a16bee7d 100644
--- a/src/common/dwarf_cu_to_module.cc
+++ b/src/common/dwarf_cu_to_module.cc
@@ -261,7 +261,7 @@ class DwarfCUToModule::GenericDIEHandler: public dwarf2reader::DIEHandler {
uint64 offset_;
// Place the name in the global set of strings. Even though this looks
- // like a copy, all the major std::string implementations use reference
+ // like a copy, all the major string implementations use reference
// counting internally, so the effect is to have all the data structures
// share copies of strings whenever possible.
// FIXME: Should this return something like a string_ref to avoid the
diff --git a/src/common/language.cc b/src/common/language.cc
index 09eaceb6..3929c0c6 100644
--- a/src/common/language.cc
+++ b/src/common/language.cc
@@ -73,7 +73,7 @@ class CPPLanguage: public Language {
}
virtual DemangleResult DemangleName(const string& mangled,
- std::string* demangled) const {
+ string* demangled) const {
#if defined(__ANDROID__)
// Android NDK doesn't provide abi::__cxa_demangle.
demangled->clear();
@@ -127,7 +127,7 @@ class SwiftLanguage: public Language {
}
virtual DemangleResult DemangleName(const string& mangled,
- std::string* demangled) const {
+ string* demangled) const {
// There is no programmatic interface to a Swift demangler. Pass through the
// mangled form because it encodes more information than the qualified name
// that would have been built by MakeQualifiedName(). The output can be
diff --git a/src/common/language.h b/src/common/language.h
index 4ebea1ab..2d2dbcd9 100644
--- a/src/common/language.h
+++ b/src/common/language.h
@@ -87,7 +87,7 @@ class Language {
// Wraps abi::__cxa_demangle() or similar for languages where appropriate.
virtual DemangleResult DemangleName(const string& mangled,
- std::string* demangled) const {
+ string* demangled) const {
demangled->clear();
return kDontDemangle;
}
diff --git a/src/common/linux/file_id.h b/src/common/linux/file_id.h
index a1d2fd6e..8ccbadd2 100644
--- a/src/common/linux/file_id.h
+++ b/src/common/linux/file_id.h
@@ -38,6 +38,7 @@
#include "common/linux/guid_creator.h"
#include "common/memory.h"
+#include "common/using_std_string.h"
namespace google_breakpad {
@@ -70,16 +71,16 @@ class FileID {
// Convert the |identifier| data to a string. The string will
// be formatted as a UUID in all uppercase without dashes.
// (e.g., 22F065BBFC9C49F780FE26A7CEBD7BCE).
- static std::string ConvertIdentifierToUUIDString(
+ static string ConvertIdentifierToUUIDString(
const wasteful_vector<uint8_t>& identifier);
// Convert the entire |identifier| data to a hex string.
- static std::string ConvertIdentifierToString(
+ static string ConvertIdentifierToString(
const wasteful_vector<uint8_t>& identifier);
private:
// Storage for the path specified
- std::string path_;
+ string path_;
};
} // namespace google_breakpad