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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // -*- mode: c++ -*- 1 // -*- mode: c++ -*-
2 2
3 // Copyright (c) 2010 Google Inc. 3 // Copyright (c) 2010 Google Inc.
4 // All rights reserved. 4 // All rights reserved.
5 // 5 //
6 // Redistribution and use in source and binary forms, with or without 6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are 7 // modification, are permitted provided that the following conditions are
8 // met: 8 // met:
9 // 9 //
10 // * Redistributions of source code must retain the above copyright 10 // * Redistributions of source code must retain the above copyright
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // parent's name, and that we don't need to know anything else about 70 // parent's name, and that we don't need to know anything else about
71 // the parent or the child (say, their DIEs' tags) to do the job. 71 // the parent or the child (say, their DIEs' tags) to do the job.
72 // This is true for the languages we support at the moment, and 72 // This is true for the languages we support at the moment, and
73 // keeps things concrete. Perhaps a more refined operation would 73 // keeps things concrete. Perhaps a more refined operation would
74 // take into account the parent and child DIE types, allow languages 74 // take into account the parent and child DIE types, allow languages
75 // to use their own data type for complex parent names, etc. But if 75 // to use their own data type for complex parent names, etc. But if
76 // C++ doesn't need all that, who would? 76 // C++ doesn't need all that, who would?
77 virtual string MakeQualifiedName (const string &parent_name, 77 virtual string MakeQualifiedName (const string &parent_name,
78 const string &name) const = 0; 78 const string &name) const = 0;
79 79
80 // Special return value from DemangleName() to indicate that demangling was
81 // not performed because it’s not appropriate to attempt.
82 static const int kDontDemangle;
83
84 // Wraps abi::__cxa_demangle() or similar for languages where appropriate.
85 // Returns the demangler's status value, or kDontDemangle if demangling (and
86 // error reporting) is inappropriate. Returns 0 on success, with |demangled|
87 // set.
88 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
89 const {
90 demangled->clear();
91 return kDontDemangle;
92 }
93
80 // Instances for specific languages. 94 // Instances for specific languages.
81 static const Language * const CPlusPlus, 95 static const Language * const CPlusPlus,
82 * const Java, 96 * const Java,
97 * const Swift,
83 * const Assembler; 98 * const Assembler;
84 }; 99 };
85 100
86 } // namespace google_breakpad 101 } // namespace google_breakpad
87 102
88 #endif // COMMON_LINUX_LANGUAGE_H__ 103 #endif // COMMON_LINUX_LANGUAGE_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698