LLDB mainline
Language.h
Go to the documentation of this file.
1//===-- Language.h ---------------------------------------------------*- C++
2//-*-===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef LLDB_TARGET_LANGUAGE_H
11#define LLDB_TARGET_LANGUAGE_H
12
13#include <functional>
14#include <memory>
15#include <set>
16#include <vector>
17
25#include "lldb/lldb-private.h"
26#include "lldb/lldb-public.h"
27#include "llvm/ADT/StringRef.h"
28#include "llvm/Support/FormatVariadic.h"
29
30namespace lldb_private {
31
33public:
35
36 static llvm::StringRef GetSettingName();
37
39};
40
41class Language : public PluginInterface {
42public:
44 public:
45 class Result {
46 public:
47 virtual bool IsValid() = 0;
48
49 virtual bool DumpToStream(Stream &stream,
50 bool print_help_if_available) = 0;
51
52 virtual ~Result() = default;
53 };
54
55 typedef std::set<std::unique_ptr<Result>> ResultSet;
56
57 virtual ~TypeScavenger() = default;
58
59 size_t Find(ExecutionContextScope *exe_scope, const char *key,
60 ResultSet &results, bool append = true);
61
62 protected:
63 TypeScavenger() = default;
64
65 virtual bool Find_Impl(ExecutionContextScope *exe_scope, const char *key,
66 ResultSet &results) = 0;
67 };
68
71 public:
73
74 bool IsValid() override { return m_compiler_type.IsValid(); }
75
76 bool DumpToStream(Stream &stream, bool print_help_if_available) override {
77 if (IsValid()) {
78 m_compiler_type.DumpTypeDescription(&stream);
79 stream.EOL();
80 return true;
81 }
82 return false;
83 }
84
85 ~Result() override = default;
86
87 private:
89 };
90
91 protected:
93
94 ~ImageListTypeScavenger() override = default;
95
96 // is this type something we should accept? it's usually going to be a
97 // filter by language + maybe some sugar tweaking
98 // returning an empty type means rejecting this candidate entirely;
99 // any other result will be accepted as a valid match
101
102 bool Find_Impl(ExecutionContextScope *exe_scope, const char *key,
103 ResultSet &results) override;
104 };
105
106 template <typename... ScavengerTypes>
108 public:
110 for (std::shared_ptr<TypeScavenger> scavenger : { std::shared_ptr<TypeScavenger>(new ScavengerTypes())... }) {
111 if (scavenger)
112 m_scavengers.push_back(scavenger);
113 }
114 }
115 protected:
116 bool Find_Impl(ExecutionContextScope *exe_scope, const char *key,
117 ResultSet &results) override {
118 const bool append = false;
119 for (auto& scavenger : m_scavengers) {
120 if (scavenger && scavenger->Find(exe_scope, key, results, append))
121 return true;
122 }
123 return false;
124 }
125 private:
126 std::vector<std::shared_ptr<TypeScavenger>> m_scavengers;
127 };
128
129 template <typename... ScavengerTypes>
131 public:
133 for (std::shared_ptr<TypeScavenger> scavenger : { std::shared_ptr<TypeScavenger>(new ScavengerTypes())... }) {
134 if (scavenger)
135 m_scavengers.push_back(scavenger);
136 }
137 }
138 protected:
139 bool Find_Impl(ExecutionContextScope *exe_scope, const char *key,
140 ResultSet &results) override {
141 const bool append = true;
142 bool success = false;
143 for (auto& scavenger : m_scavengers) {
144 if (scavenger)
145 success = scavenger->Find(exe_scope, key, results, append) || success;
146 }
147 return success;
148 }
149 private:
150 std::vector<std::shared_ptr<TypeScavenger>> m_scavengers;
151 };
152
158
159 ~Language() override;
160
161 static Language *FindPlugin(lldb::LanguageType language);
162
163 /// Returns the Language associated with the given file path or a nullptr
164 /// if there is no known language.
165 static Language *FindPlugin(llvm::StringRef file_path);
166
167 static Language *FindPlugin(lldb::LanguageType language,
168 llvm::StringRef file_path);
169
170 static llvm::Expected<lldb::LanguageType>
171 GetExceptionLanguageForLanguage(llvm::StringRef lang_name);
172 // return false from callback to stop iterating
173 static void ForEach(llvm::function_ref<IterationAction(Language *)> callback);
174
176
177 // Implement this function to return the user-defined entry point name
178 // for the language.
179 virtual llvm::StringRef GetUserEntryPointName() const { return {}; }
180
181 virtual bool IsTopLevelFunction(Function &function);
182
183 virtual bool IsSourceFile(llvm::StringRef file_path) const = 0;
184
186
188
190
193
194 virtual std::vector<FormattersMatchCandidate>
196 lldb::DynamicValueType use_dynamic);
197
198 virtual std::unique_ptr<TypeScavenger> GetTypeScavenger();
199
200 virtual const char *GetLanguageSpecificTypeLookupHelp();
201
204 lldb::FunctionNameType m_type;
205
206 public:
207 MethodNameVariant(ConstString name, lldb::FunctionNameType type)
208 : m_name(name), m_type(type) {}
209 ConstString GetName() const { return m_name; }
210 lldb::FunctionNameType GetType() const { return m_type; }
211 };
212 // If a language can have more than one possible name for a method, this
213 // function can be used to enumerate them. This is useful when doing name
214 // lookups.
215 virtual std::vector<Language::MethodNameVariant>
217 return std::vector<Language::MethodNameVariant>();
218 };
219
221 public:
223
228
229 virtual ~MethodName() {};
230
231 void Clear() {
232 m_full.Clear();
233 m_basename = llvm::StringRef();
234 m_context = llvm::StringRef();
235 m_arguments = llvm::StringRef();
236 m_qualifiers = llvm::StringRef();
237 m_return_type = llvm::StringRef();
238 m_scope_qualified.clear();
239 m_parsed = false;
240 m_parse_error = false;
241 }
242
243 bool IsValid() {
244 if (!m_parsed)
245 Parse();
246 if (m_parse_error)
247 return false;
248 return (bool)m_full;
249 }
250
251 ConstString GetFullName() const { return m_full; }
252
253 llvm::StringRef GetBasename() {
254 if (!m_parsed)
255 Parse();
256 return m_basename;
257 }
258
259 llvm::StringRef GetContext() {
260 if (!m_parsed)
261 Parse();
262 return m_context;
263 }
264
265 llvm::StringRef GetArguments() {
266 if (!m_parsed)
267 Parse();
268 return m_arguments;
269 }
270
271 llvm::StringRef GetQualifiers() {
272 if (!m_parsed)
273 Parse();
274 return m_qualifiers;
275 }
276
277 llvm::StringRef GetReturnType() {
278 if (!m_parsed)
279 Parse();
280 return m_return_type;
281 }
282
283 std::string GetScopeQualifiedName() {
284 if (!m_parsed)
285 Parse();
286 return m_scope_qualified;
287 }
288
289 protected:
290 virtual void Parse() {
291 m_parsed = true;
292 m_parse_error = true;
293 }
294
295 ConstString m_full; // Full name:
296 // "size_t lldb::SBTarget::GetBreakpointAtIndex(unsigned
297 // int) const"
298 llvm::StringRef m_basename; // Basename: "GetBreakpointAtIndex"
299 llvm::StringRef m_context; // Decl context: "lldb::SBTarget"
300 llvm::StringRef m_arguments; // Arguments: "(unsigned int)"
301 llvm::StringRef m_qualifiers; // Qualifiers: "const"
302 llvm::StringRef m_return_type; // Return type: "size_t"
303 std::string m_scope_qualified;
304 bool m_parsed = false;
305 bool m_parse_error = false;
306 };
307
308 virtual std::unique_ptr<Language::MethodName>
310 return std::make_unique<Language::MethodName>(name);
311 };
312
313 virtual std::pair<lldb::FunctionNameType, std::optional<ConstString>>
315 return std::pair{lldb::eFunctionNameTypeNone, std::nullopt};
316 };
317
318 /// Returns true iff the given symbol name is compatible with the mangling
319 /// scheme of this language.
320 ///
321 /// This function should only return true if there is a high confidence
322 /// that the name actually belongs to this language.
323 virtual bool SymbolNameFitsToLanguage(const Mangled &name) const {
324 return false;
325 }
326
327 /// An individual data formatter may apply to several types and cross language
328 /// boundaries. Each of those languages may want to customize the display of
329 /// values of said types by appending proper prefix/suffix information in
330 /// language-specific ways. This function returns that prefix and suffix.
331 ///
332 /// \param[in] type_hint
333 /// A StringRef used to determine what the prefix and suffix should be. It
334 /// is called a hint because some types may have multiple variants for which
335 /// the prefix and/or suffix may vary.
336 ///
337 /// \return
338 /// A std::pair<StringRef, StringRef>, the first being the prefix and the
339 /// second being the suffix. They may be empty.
340 virtual std::pair<llvm::StringRef, llvm::StringRef>
341 GetFormatterPrefixSuffix(llvm::StringRef type_hint);
342
343 // When looking up functions, we take a user provided string which may be a
344 // partial match to the full demangled name and compare it to the actual
345 // demangled name to see if it matches as much as the user specified. An
346 // example of this is if the user provided A::my_function, but the
347 // symbol was really B::A::my_function. We want that to be
348 // a match. But we wouldn't want this to match AnotherA::my_function. The
349 // user is specifying a truncated path, not a truncated set of characters.
350 // This function does a language-aware comparison for those purposes.
351 virtual bool DemangledNameContainsPath(llvm::StringRef path,
352 ConstString demangled) const;
353
354 // if a language has a custom format for printing variable declarations that
355 // it wants LLDB to honor it should return an appropriate closure here
357
358 virtual LazyBool IsLogicalTrue(ValueObject &valobj, Status &error);
359
360 // for a ValueObject of some "reference type", if the value points to the
361 // nil/null object, this method returns true
362 virtual bool IsNilReference(ValueObject &valobj);
363
364 /// Returns the summary string for ValueObjects for which IsNilReference() is
365 /// true.
366 virtual llvm::StringRef GetNilReferenceSummaryString() { return {}; }
367
368 // for a ValueObject of some "reference type", if the language provides a
369 // technique to decide whether the reference has ever been assigned to some
370 // object, this method will return true if such detection is possible, and if
371 // the reference has never been assigned
372 virtual bool IsUninitializedReference(ValueObject &valobj);
373
374 virtual bool GetFunctionDisplayName(const SymbolContext &sc,
375 const ExecutionContext *exe_ctx,
376 FunctionNameRepresentation representation,
377 Stream &s);
378
380 const ExecutionContext *exe_ctx,
382 Stream &s) {
383 return false;
384 }
385
386 virtual ConstString
388 if (ConstString demangled = mangled.GetDemangledName())
389 return demangled;
390
391 return mangled.GetMangledName();
392 }
393
395 return mangled.GetDemangledName();
396 }
397
398 virtual void GetExceptionResolverDescription(bool catch_on, bool throw_on,
399 Stream &s);
400
401 static void GetDefaultExceptionResolverDescription(bool catch_on,
402 bool throw_on, Stream &s);
403
404 // These are accessors for general information about the Languages lldb knows
405 // about:
406
407 static lldb::LanguageType
408 GetLanguageTypeFromString(const char *string) = delete;
409 static lldb::LanguageType GetLanguageTypeFromString(llvm::StringRef string);
410
411 /// Returns the internal LLDB name for the specified language. When presenting
412 /// the language name to users, use \ref GetDisplayNameForLanguageType
413 /// instead.
414 static const char *GetNameForLanguageType(lldb::LanguageType language);
415
416 /// Returns a user-friendly name for the specified language.
417 static llvm::StringRef
419
420 static void PrintAllLanguages(Stream &s, const char *prefix,
421 const char *suffix);
422
423 /// Prints to the specified stream 's' each language type that the
424 /// current target supports for expression evaluation.
425 ///
426 /// \param[out] s Stream to which the language types are written.
427 /// \param[in] prefix String that is prepended to the language type.
428 /// \param[in] suffix String that is appended to the language type.
430 llvm::StringRef prefix,
431 llvm::StringRef suffix);
432
433 // return false from callback to stop iterating
434 static void ForAllLanguages(
435 llvm::function_ref<IterationAction(lldb::LanguageType)> callback);
436
437 static bool LanguageIsCPlusPlus(lldb::LanguageType language);
438
439 static bool LanguageIsObjC(lldb::LanguageType language);
440
441 static bool LanguageIsC(lldb::LanguageType language);
442
443 /// Equivalent to \c LanguageIsC||LanguageIsObjC||LanguageIsCPlusPlus.
444 static bool LanguageIsCFamily(lldb::LanguageType language);
445
446 static bool LanguageIsPascal(lldb::LanguageType language);
447
448 // return the primary language, so if LanguageIsC(l), return eLanguageTypeC,
449 // etc.
451
452 static std::set<lldb::LanguageType> GetSupportedLanguages();
453
457
459
460 // Given a mangled function name, calculates some alternative manglings since
461 // the compiler mangling may not line up with the symbol we are expecting.
462 virtual std::vector<ConstString>
464 return std::vector<ConstString>();
465 }
466
467 virtual ConstString
469 const SymbolContext &sym_ctx) const {
470 return ConstString();
471 }
472
473 virtual llvm::StringRef GetInstanceName() { return {}; }
474
475 /// Given a symbol context list of matches which supposedly represent the
476 /// same file and line number in a CU, erases those that should be ignored
477 /// when setting breakpoints by line (number or regex). Helpful for languages
478 /// that create split a single source-line into many functions (e.g. call
479 /// sites transformed by CoroSplitter).
480 virtual void
482
483 /// Returns a boolean indicating whether two symbol contexts are equal for the
484 /// purposes of frame comparison. If the plugin has no opinion, it should
485 /// return nullopt.
486 virtual std::optional<bool>
488 const SymbolContext &sc2) const {
489 return {};
490 }
491
492 virtual std::optional<bool> GetBooleanFromString(llvm::StringRef str) const;
493
494 /// Returns true if this Language supports exception breakpoints on throw via
495 /// a corresponding LanguageRuntime plugin.
496 virtual bool SupportsExceptionBreakpointsOnThrow() const { return false; }
497
498 /// Returns true if this Language supports exception breakpoints on catch via
499 /// a corresponding LanguageRuntime plugin.
500 virtual bool SupportsExceptionBreakpointsOnCatch() const { return false; }
501
502 /// Returns the keyword used for throw statements in this language, e.g.
503 /// Python uses \b raise. Defaults to \b throw.
504 virtual llvm::StringRef GetThrowKeyword() const { return "throw"; }
505
506 /// Returns the keyword used for catch statements in this language, e.g.
507 /// Python uses \b except. Defaults to \b catch.
508 virtual llvm::StringRef GetCatchKeyword() const { return "catch"; }
509
510 virtual FormatEntity::Entry GetFunctionNameFormat() const { return {}; }
511
512protected:
513 // Classes that inherit from Language can see and modify these
514
516
517private:
518 Language(const Language &) = delete;
519 const Language &operator=(const Language &) = delete;
520};
521
522} // namespace lldb_private
523
524namespace llvm {
525template <> struct format_provider<lldb::LanguageType> {
526 static void format(const lldb::LanguageType &language, llvm::raw_ostream &OS,
527 llvm::StringRef Options);
528};
529} // namespace llvm
530
531#endif // LLDB_TARGET_LANGUAGE_H
static llvm::raw_ostream & error(Stream &strm)
Generic representation of a type in a programming language.
A uniqued constant string class.
Definition ConstString.h:40
std::function< bool(ConstString, ConstString, const DumpValueObjectOptions &, Stream &)> DeclPrintingHelper
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A class that describes a function.
Definition Function.h:392
HardcodedFormatterFinders< SyntheticChildren > HardcodedSyntheticFinder
HardcodedFormatterFinders< TypeSummaryImpl > HardcodedSummaryFinder
HardcodedFormatterFinders< TypeFormatImpl > HardcodedFormatFinder
static llvm::StringRef GetSettingName()
Definition Language.cpp:45
bool GetEnableFilterForLineBreakpoints() const
Definition Language.cpp:55
bool Find_Impl(ExecutionContextScope *exe_scope, const char *key, ResultSet &results) override
Definition Language.h:116
std::vector< std::shared_ptr< TypeScavenger > > m_scavengers
Definition Language.h:126
bool DumpToStream(Stream &stream, bool print_help_if_available) override
Definition Language.h:76
virtual CompilerType AdjustForInclusion(CompilerType &candidate)=0
bool Find_Impl(ExecutionContextScope *exe_scope, const char *key, ResultSet &results) override
Definition Language.cpp:504
MethodNameVariant(ConstString name, lldb::FunctionNameType type)
Definition Language.h:207
lldb::FunctionNameType GetType() const
Definition Language.h:210
ConstString GetFullName() const
Definition Language.h:251
llvm::StringRef GetQualifiers()
Definition Language.h:271
llvm::StringRef GetReturnType()
Definition Language.h:277
virtual bool DumpToStream(Stream &stream, bool print_help_if_available)=0
std::set< std::unique_ptr< Result > > ResultSet
Definition Language.h:55
virtual bool Find_Impl(ExecutionContextScope *exe_scope, const char *key, ResultSet &results)=0
size_t Find(ExecutionContextScope *exe_scope, const char *key, ResultSet &results, bool append=true)
Definition Language.cpp:485
std::vector< std::shared_ptr< TypeScavenger > > m_scavengers
Definition Language.h:150
bool Find_Impl(ExecutionContextScope *exe_scope, const char *key, ResultSet &results) override
Definition Language.h:139
virtual bool IsSourceFile(llvm::StringRef file_path) const =0
static void PrintSupportedLanguagesForExpressions(Stream &s, llvm::StringRef prefix, llvm::StringRef suffix)
Prints to the specified stream 's' each language type that the current target supports for expression...
Definition Language.cpp:316
static LanguageSet GetLanguagesSupportingREPLs()
Definition Language.cpp:475
static LanguageSet GetLanguagesSupportingTypeSystems()
Definition Language.cpp:467
virtual std::optional< bool > GetBooleanFromString(llvm::StringRef str) const
Definition Language.cpp:575
virtual ConstString GetDisplayDemangledName(Mangled mangled) const
Definition Language.h:394
virtual std::vector< FormattersMatchCandidate > GetPossibleFormattersMatches(ValueObject &valobj, lldb::DynamicValueType use_dynamic)
Definition Language.cpp:218
virtual bool HandleFrameFormatVariable(const SymbolContext &sc, const ExecutionContext *exe_ctx, FormatEntity::Entry::Type type, Stream &s)
Definition Language.h:379
virtual bool SupportsExceptionBreakpointsOnCatch() const
Returns true if this Language supports exception breakpoints on catch via a corresponding LanguageRun...
Definition Language.h:500
virtual lldb::TypeCategoryImplSP GetFormatters()
Definition Language.cpp:202
virtual llvm::StringRef GetInstanceName()
Definition Language.h:473
static void ForEach(llvm::function_ref< IterationAction(Language *)> callback)
Definition Language.cpp:127
static void ForAllLanguages(llvm::function_ref< IterationAction(lldb::LanguageType)> callback)
Definition Language.cpp:334
static Language * FindPlugin(lldb::LanguageType language)
Definition Language.cpp:84
static const char * GetNameForLanguageType(lldb::LanguageType language)
Returns the internal LLDB name for the specified language.
Definition Language.cpp:305
virtual bool SymbolNameFitsToLanguage(const Mangled &name) const
Returns true iff the given symbol name is compatible with the mangling scheme of this language.
Definition Language.h:323
virtual void FilterForLineBreakpoints(llvm::SmallVectorImpl< SymbolContext > &) const
Given a symbol context list of matches which supposedly represent the same file and line number in a ...
Definition Language.h:481
virtual DumpValueObjectOptions::DeclPrintingHelper GetDeclPrintingHelper()
Definition Language.cpp:544
static LanguageProperties & GetGlobalLanguageProperties()
Definition Language.cpp:40
virtual LazyBool IsLogicalTrue(ValueObject &valobj, Status &error)
Definition Language.cpp:548
virtual ConstString GetDemangledFunctionNameWithoutArguments(Mangled mangled) const
Definition Language.h:387
virtual std::unique_ptr< Language::MethodName > GetMethodName(ConstString name) const
Definition Language.h:309
virtual const char * GetLanguageSpecificTypeLookupHelp()
Definition Language.cpp:483
virtual bool GetFunctionDisplayName(const SymbolContext &sc, const ExecutionContext *exe_ctx, FunctionNameRepresentation representation, Stream &s)
Definition Language.cpp:556
virtual std::pair< llvm::StringRef, llvm::StringRef > GetFormatterPrefixSuffix(llvm::StringRef type_hint)
An individual data formatter may apply to several types and cross language boundaries.
Definition Language.cpp:532
virtual llvm::StringRef GetCatchKeyword() const
Returns the keyword used for catch statements in this language, e.g.
Definition Language.h:508
virtual llvm::StringRef GetThrowKeyword() const
Returns the keyword used for throw statements in this language, e.g.
Definition Language.h:504
static bool LanguageIsC(lldb::LanguageType language)
Definition Language.cpp:367
virtual lldb::LanguageType GetLanguageType() const =0
virtual HardcodedFormatters::HardcodedSummaryFinder GetHardcodedSummaries()
Definition Language.cpp:208
virtual std::vector< Language::MethodNameVariant > GetMethodNameVariants(ConstString method_name) const
Definition Language.h:216
static void GetDefaultExceptionResolverDescription(bool catch_on, bool throw_on, Stream &s)
Definition Language.cpp:568
virtual std::pair< lldb::FunctionNameType, std::optional< ConstString > > GetFunctionNameInfo(ConstString name) const
Definition Language.h:314
virtual bool SupportsExceptionBreakpointsOnThrow() const
Returns true if this Language supports exception breakpoints on throw via a corresponding LanguageRun...
Definition Language.h:496
virtual std::optional< bool > AreEqualForFrameComparison(const SymbolContext &sc1, const SymbolContext &sc2) const
Returns a boolean indicating whether two symbol contexts are equal for the purposes of frame comparis...
Definition Language.h:487
virtual bool DemangledNameContainsPath(llvm::StringRef path, ConstString demangled) const
Definition Language.cpp:536
virtual std::vector< ConstString > GenerateAlternateFunctionManglings(const ConstString mangled) const
Definition Language.h:463
static bool LanguageIsCPlusPlus(lldb::LanguageType language)
Definition Language.cpp:342
static llvm::StringRef GetDisplayNameForLanguageType(lldb::LanguageType language)
Returns a user-friendly name for the specified language.
Definition Language.cpp:312
static lldb::LanguageType GetPrimaryLanguage(lldb::LanguageType language)
Definition Language.cpp:408
const Language & operator=(const Language &)=delete
virtual ConstString FindBestAlternateFunctionMangledName(const Mangled mangled, const SymbolContext &sym_ctx) const
Definition Language.h:468
static bool LanguageIsPascal(lldb::LanguageType language)
Definition Language.cpp:399
virtual bool IsNilReference(ValueObject &valobj)
Definition Language.cpp:552
virtual bool IsUninitializedReference(ValueObject &valobj)
Definition Language.cpp:554
virtual FormatEntity::Entry GetFunctionNameFormat() const
Definition Language.h:510
virtual llvm::StringRef GetNilReferenceSummaryString()
Returns the summary string for ValueObjects for which IsNilReference() is true.
Definition Language.h:366
static void PrintAllLanguages(Stream &s, const char *prefix, const char *suffix)
Definition Language.cpp:327
static llvm::Expected< lldb::LanguageType > GetExceptionLanguageForLanguage(llvm::StringRef lang_name)
Definition Language.cpp:159
virtual HardcodedFormatters::HardcodedSyntheticFinder GetHardcodedSynthetics()
Definition Language.cpp:213
virtual std::unique_ptr< TypeScavenger > GetTypeScavenger()
Definition Language.cpp:479
static LanguageSet GetLanguagesSupportingTypeSystemsForExpressions()
Definition Language.cpp:471
virtual llvm::StringRef GetUserEntryPointName() const
Definition Language.h:179
virtual bool IsTopLevelFunction(Function &function)
Definition Language.cpp:200
virtual void GetExceptionResolverDescription(bool catch_on, bool throw_on, Stream &s)
Definition Language.cpp:563
static lldb::LanguageType GetLanguageTypeFromString(const char *string)=delete
Language(const Language &)=delete
static bool LanguageIsCFamily(lldb::LanguageType language)
Equivalent to LanguageIsC||LanguageIsObjC||LanguageIsCPlusPlus.
Definition Language.cpp:379
static std::set< lldb::LanguageType > GetSupportedLanguages()
Definition Language.cpp:458
virtual HardcodedFormatters::HardcodedFormatFinder GetHardcodedFormats()
Definition Language.cpp:204
static bool LanguageIsObjC(lldb::LanguageType language)
Definition Language.cpp:357
A class that handles mangled names.
Definition Mangled.h:34
ConstString GetMangledName() const
Mangled name get accessor.
Definition Mangled.h:174
ConstString GetDemangledName() const
Demangled name get accessor.
Definition Mangled.cpp:284
An error handling class.
Definition Status.h:118
A stream class that can stream formatted output to a file.
Definition Stream.h:28
size_t EOL()
Output and End of Line character to the stream.
Definition Stream.cpp:155
Defines a symbol context baton that can be handed other debug core functions.
A class that represents a running process on the host machine.
IterationAction
Useful for callbacks whose return type indicates whether to continue iteration or short-circuit.
LanguageType
Programming language type.
std::shared_ptr< lldb_private::TypeCategoryImpl > TypeCategoryImplSP
A SmallBitVector that represents a set of source languages (lldb::LanguageType).
Definition Type.h:38
static void format(const lldb::LanguageType &language, llvm::raw_ostream &OS, llvm::StringRef Options)
Definition Language.cpp:635