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

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: #else 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
« no previous file with comments | « src/common/dwarf_cu_to_module_unittest.cc ('k') | src/common/language.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 enum DemangleResult {
81 // Demangling was not performed because it’s not appropriate to attempt.
82 kDontDemangle = -1,
83
84 kDemangleSuccess,
85 kDemangleFailure,
86 };
87
88 // Wraps abi::__cxa_demangle() or similar for languages where appropriate.
89 virtual DemangleResult DemangleName(const string& mangled,
90 std::string* demangled) const {
91 demangled->clear();
92 return kDontDemangle;
93 }
94
80 // Instances for specific languages. 95 // Instances for specific languages.
81 static const Language * const CPlusPlus, 96 static const Language * const CPlusPlus,
82 * const Java, 97 * const Java,
98 * const Swift,
83 * const Assembler; 99 * const Assembler;
84 }; 100 };
85 101
86 } // namespace google_breakpad 102 } // namespace google_breakpad
87 103
88 #endif // COMMON_LINUX_LANGUAGE_H__ 104 #endif // COMMON_LINUX_LANGUAGE_H__
OLDNEW
« no previous file with comments | « src/common/dwarf_cu_to_module_unittest.cc ('k') | src/common/language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698