Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Unified Diff: src/common/language.h

Issue 2147523005: Initial support for dumping DWARF corresponding to Swift code (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Pass through mangled Swift names; support DWARF 4's DW_AT_linkage_name Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/common/language.h
diff --git a/src/common/language.h b/src/common/language.h
index bbe303347a32a160f6da2aeb69284e6563620e2f..9e92d8139f7471e33e27857da9c45237879e3d3b 100644
--- a/src/common/language.h
+++ b/src/common/language.h
@@ -77,9 +77,24 @@ class Language {
virtual string MakeQualifiedName (const string &parent_name,
const string &name) const = 0;
+ // Special return value from DemangleName() to indicate that demangling was
+ // not performed because it’s not appropriate to attempt.
+ static const int kDontDemangle;
+
+ // Wraps abi::__cxa_demangle() or similar for languages where appropriate.
+ // Returns the demangler's status value, or kDontDemangle if demangling (and
+ // error reporting) is inappropriate. Returns 0 on success, with |demangled|
+ // set.
+ virtual int DemangleName(const string& mangled, std::string* demangled)
Ted Mielczarek 2016/09/14 10:20:10 I think it would be better to make this return an
+ const {
+ demangled->clear();
+ return kDontDemangle;
+ }
+
// Instances for specific languages.
static const Language * const CPlusPlus,
* const Java,
+ * const Swift,
* const Assembler;
};

Powered by Google App Engine
This is Rietveld 408576698