Skip to content

Commit 36d6cf9

Browse files
committed
fixup! add docs
1 parent 0b07e48 commit 36d6cf9

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,73 @@ class CPlusPlusLanguage : public Language {
164164
ConstString FindBestAlternateFunctionMangledName(
165165
const Mangled mangled, const SymbolContext &sym_ctx) const override;
166166

167+
/// Substitutes Itanium type encoding substrings given by \c subst_from
168+
/// in \c mangled_name with \c subst_to.
169+
///
170+
/// This function will only replace Itanium type encodings (i.e., <type>
171+
/// productions in the Itanium ABI mangling grammar). However, no verifiction
172+
/// is done on whether \c subst_from or \c subst_to is a valid type encoding.
173+
///
174+
/// \param[in] mangled_name Mangled name to perform the substitutions in.
175+
/// This function only supports Itanium ABI mangling.
176+
///
177+
/// \param[in] subst_from The substring to substitute.
178+
///
179+
/// \param[in] subst_to The substring to insert.
180+
///
181+
/// \returns The mangled string with substitutions. If no substitutions
182+
/// have been made, returns an empty \c ConstString (even if the string
183+
/// already contained the substitutions). If an error occurred, this function
184+
/// returns the error.
185+
///
167186
static llvm::Expected<ConstString>
168187
SubstituteType_ItaniumMangle(llvm::StringRef mangled_name,
169188
llvm::StringRef subst_from,
170189
llvm::StringRef subst_to);
171190

191+
/// Substitutes Itanium structor encoding substrings given by \c subst_from
192+
/// in \c mangled_name with \c subst_to.
193+
///
194+
/// This function will only replace Itanium structor encodings (i.e.,
195+
/// <ctor-dtor-name> productions in the Itanium ABI mangling grammar).
196+
/// However, no verifiction is done on whether \c subst_from or \c subst_to is
197+
/// a valid structor encoding.
198+
///
199+
/// \param[in] mangled_name Mangled name to perform the substitutions in.
200+
/// This function only supports Itanium ABI mangling.
201+
///
202+
/// \param[in] subst_from The substring to substitute.
203+
///
204+
/// \param[in] subst_to The substring to insert.
205+
///
206+
/// \returns The mangled string with substitutions. If no substitutions
207+
/// have been made, returns an empty \c ConstString (even if the string
208+
/// already contained the substitutions). If an error occurred, this function
209+
/// returns the error.
210+
///
172211
static llvm::Expected<ConstString>
173212
SubstituteStructor_ItaniumMangle(llvm::StringRef mangled_name,
174213
llvm::StringRef subst_from,
175214
llvm::StringRef subst_to);
176215

216+
/// Tries replacing Itanium structor encoding substrings in \c mangled_name
217+
/// with potential aliases.j
218+
///
219+
/// This function will only replace Itanium structor encodings (i.e.,
220+
/// <ctor-dtor-name> productions in the Itanium ABI mangling grammar).
221+
///
222+
/// E.g., on some platforms, the C1/D1 variants are aliased to the C2/D2
223+
/// variants. This function will try to replace occurrences of C1/D1 with
224+
/// C2/D2.
225+
///
226+
/// \param[in] mangled_name Mangled name to perform the substitutions in.
227+
/// This function only supports Itanium ABI mangling.
228+
///
229+
/// \returns The mangled string with substitutions. If no substitutions
230+
/// have been made, returns an empty \c ConstString (even if the string
231+
/// already contained the substitutions). If an error occurred, this function
232+
/// returns the error.
233+
///
177234
static llvm::Expected<ConstString>
178235
SubstituteStructorAliases_ItaniumMangle(llvm::StringRef mangled_name);
179236

0 commit comments

Comments
 (0)