1 //===-- CPPLanguageRuntime.h ---------------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_CPPLanguageRuntime_h_
11 #define liblldb_CPPLanguageRuntime_h_
16 // Other libraries and framework includes
18 #include "lldb/Core/PluginInterface.h"
19 #include "lldb/lldb-private.h"
20 #include "lldb/Target/LanguageRuntime.h"
22 namespace lldb_private {
24 class CPPLanguageRuntime :
25 public LanguageRuntime
46 m_type (eTypeInvalid),
52 MethodName (const ConstString &s) :
58 m_type (eTypeInvalid),
72 if (m_type == eTypeInvalid)
105 ConstString m_full; // Full name: "lldb::SBTarget::GetBreakpointAtIndex(unsigned int) const"
106 llvm::StringRef m_basename; // Basename: "GetBreakpointAtIndex"
107 llvm::StringRef m_context; // Decl context: "lldb::SBTarget"
108 llvm::StringRef m_arguments; // Arguments: "(unsigned int)"
109 llvm::StringRef m_qualifiers; // Qualifiers: "const"
116 ~CPPLanguageRuntime();
118 virtual lldb::LanguageType
119 GetLanguageType () const
121 return lldb::eLanguageTypeC_plus_plus;
125 IsVTableName (const char *name) = 0;
128 GetObjectDescription (Stream &str, ValueObject &object);
131 GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope);
134 IsCPPMangledName(const char *name);
137 StripNamespacesFromVariableName (const char *name, const char *&base_name_start, const char *&base_name_end);
139 // in some cases, compilers will output different names for one same type. when tht happens, it might be impossible
140 // to construct SBType objects for a valid type, because the name that is available is not the same as the name that
141 // can be used as a search key in FindTypes(). the equivalents map here is meant to return possible alternative names
142 // for a type through which a search can be conducted. Currently, this is only enabled for C++ but can be extended
143 // to ObjC or other languages if necessary
145 FindEquivalentNames(ConstString type_name, std::vector<ConstString>& equivalents);
148 //------------------------------------------------------------------
149 // Classes that inherit from CPPLanguageRuntime can see and modify these
150 //------------------------------------------------------------------
151 CPPLanguageRuntime(Process *process);
153 DISALLOW_COPY_AND_ASSIGN (CPPLanguageRuntime);
156 } // namespace lldb_private
158 #endif // liblldb_CPPLanguageRuntime_h_