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; |
}; |