Index: src/common/language.h |
diff --git a/src/common/language.h b/src/common/language.h |
index bbe303347a32a160f6da2aeb69284e6563620e2f..057861995083172b4ad2f3cefd325c0971250867 100644 |
--- a/src/common/language.h |
+++ b/src/common/language.h |
@@ -77,9 +77,25 @@ class Language { |
virtual string MakeQualifiedName (const string &parent_name, |
const string &name) const = 0; |
+ enum DemangleResult { |
+ // Demangling was not performed because it’s not appropriate to attempt. |
+ kDontDemangle = -1, |
+ |
+ kDemangleSuccess, |
+ kDemangleFailure, |
+ }; |
+ |
+ // Wraps abi::__cxa_demangle() or similar for languages where appropriate. |
+ virtual DemangleResult DemangleName(const string& mangled, |
+ std::string* demangled) const { |
+ demangled->clear(); |
+ return kDontDemangle; |
+ } |
+ |
// Instances for specific languages. |
static const Language * const CPlusPlus, |
* const Java, |
+ * const Swift, |
* const Assembler; |
}; |