lldb-forward.h revision 47beabb1386be44e3f90dbc30a0b22c23b93a4dc
1//===-- lldb-forward.h ------------------------------------------*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef LLDB_lldb_forward_h_
11#define LLDB_lldb_forward_h_
12
13#if defined(__cplusplus)
14
15#include <ciso646>  // detect C++ lib
16
17#ifdef _LIBCPP_VERSION
18#include <memory>
19#define STD_SHARED_PTR(T) std::shared_ptr<T>
20#define STD_WEAK_PTR(T) std::weak_ptr<T>
21#define STD_ENABLE_SHARED_FROM_THIS(T) std::enable_shared_from_this<T>
22#define STD_STATIC_POINTER_CAST(T,V) std::static_pointer_cast<T>(V)
23#else
24#include <tr1/memory>
25#define STD_SHARED_PTR(T) std::tr1::shared_ptr<T>
26#define STD_WEAK_PTR(T) std::tr1::weak_ptr<T>
27#define STD_ENABLE_SHARED_FROM_THIS(T) std::tr1::enable_shared_from_this<T>
28#define STD_STATIC_POINTER_CAST(T,V) std::tr1::static_pointer_cast<T>(V)
29#endif
30
31#include "lldb/Utility/SharingPtr.h"
32
33//----------------------------------------------------------------------
34// lldb forward declarations
35//----------------------------------------------------------------------
36namespace lldb_private {
37
38class   ABI;
39class   Address;
40class   AddressImpl;
41class   AddressRange;
42class   AddressResolver;
43class   ArchSpec;
44class   Args;
45class   ASTResultSynthesizer;
46class   Baton;
47class   Block;
48class   Breakpoint;
49class   BreakpointID;
50class   BreakpointIDList;
51class   BreakpointList;
52class   BreakpointLocation;
53class   BreakpointLocationCollection;
54class   BreakpointLocationList;
55class   BreakpointOptions;
56class   BreakpointResolver;
57class   BreakpointSite;
58class   BreakpointSiteList;
59class   BroadcastEventSpec;
60class   Broadcaster;
61class   BroadcasterManager;
62class   CPPLanguageRuntime;
63class   ClangASTContext;
64class   ClangASTImporter;
65class   ClangASTSource;
66class   ClangASTType;
67class   ClangNamespaceDecl;
68class   ClangExpression;
69class   ClangExpressionDeclMap;
70class   ClangExpressionParser;
71class   ClangExpressionVariable;
72class   ClangExpressionVariableList;
73class   ClangExpressionVariableList;
74class   ClangExpressionVariables;
75class   ClangFunction;
76class   ClangPersistentVariables;
77class   ClangUserExpression;
78class   ClangUtilityFunction;
79class   CommandInterpreter;
80class   CommandObject;
81class   CommandReturnObject;
82class   Communication;
83class   CompileUnit;
84class   Condition;
85class   Connection;
86class   ConnectionFileDescriptor;
87class   ConstString;
88class   CXXSyntheticChildren;
89class   DWARFCallFrameInfo;
90class   DWARFExpression;
91class   DataBuffer;
92class   DataEncoder;
93class   DataExtractor;
94class   Debugger;
95class   Declaration;
96class   Disassembler;
97class   DynamicLibrary;
98class   DynamicLoader;
99class   EmulateInstruction;
100class   Error;
101class   EvaluateExpressionOptions;
102class   Event;
103class   EventData;
104class   ExecutionContext;
105class   ExecutionContextRef;
106class   ExecutionContextRefLocker;
107class   ExecutionContextScope;
108class   FileSpec;
109class   FileSpecList;
110class   Flags;
111class   TypeCategoryImpl;
112class   FormatManager;
113class   FuncUnwinders;
114class   Function;
115class   FunctionInfo;
116class   InlineFunctionInfo;
117class   InputReader;
118class   Instruction;
119class   InstructionList;
120class   LanguageRuntime;
121class   LineTable;
122class   Listener;
123class   Log;
124class   LogChannel;
125class   Mangled;
126class   Module;
127class   ModuleList;
128class   ModuleSpec;
129class   Mutex;
130struct  NameSearchContext;
131class   ObjCLanguageRuntime;
132class   ObjectContainer;
133class   OptionGroup;
134class   OptionGroupPlatform;
135class   ObjectFile;
136class   OperatingSystem;
137class   Options;
138class   OptionValue;
139class   OptionValueArch;
140class   OptionValueArgs;
141class   OptionValueArray;
142class   OptionValueBoolean;
143class   OptionValueDictionary;
144class   OptionValueEnumeration;
145class   OptionValueFileSpec;
146class   OptionValueFileSpecList;
147class   OptionValueFormat;
148class   OptionValuePathMappings;
149class   OptionValueProperties;
150class   OptionValueRegex;
151class   OptionValueSInt64;
152class   OptionValueString;
153class   OptionValueUInt64;
154class   OptionValueUUID;
155class   NamedOption;
156class   PathMappingList;
157class   Platform;
158class   Process;
159class   ProcessAttachInfo;
160class   ProcessModID;
161class   ProcessInfo;
162class   ProcessInstanceInfo;
163class   ProcessInstanceInfoList;
164class   ProcessInstanceInfoMatch;
165class   ProcessLaunchInfo;
166class   Property;
167struct  PropertyDefinition;
168class   PythonDataArray;
169class   PythonDataDictionary;
170class   PythonDataInteger;
171class   PythonDataObject;
172class   PythonDataString;
173class   RegisterContext;
174class   RegisterLocation;
175class   RegisterLocationList;
176class   RegisterValue;
177class   RegularExpression;
178class   Scalar;
179class   ScriptInterpreter;
180class   ScriptInterpreterObject;
181#ifndef LLDB_DISABLE_PYTHON
182class   ScriptInterpreterPython;
183struct  ScriptSummaryFormat;
184#endif
185class   SearchFilter;
186class   Section;
187class   SectionImpl;
188class   SectionList;
189class   Settings;
190class   SourceManager;
191class   SourceManagerImpl;
192class   StackFrame;
193class   StackFrameImpl;
194class   StackFrameList;
195class   StackID;
196class   StopInfo;
197class   Stoppoint;
198class   StoppointCallbackContext;
199class   StoppointLocation;
200class   Stream;
201template <unsigned N> class StreamBuffer;
202class   StreamFile;
203class   StreamString;
204class   StringList;
205struct  StringSummaryFormat;
206class   TypeSummaryImpl;
207class   Symbol;
208class   SymbolContext;
209class   SymbolContextList;
210class   SymbolContextScope;
211class   SymbolContextSpecifier;
212class   SymbolFile;
213class   SymbolFileType;
214class   SymbolVendor;
215class   Symtab;
216class   SyntheticChildren;
217class   SyntheticChildrenFrontEnd;
218class   TypeFilterImpl;
219#ifndef LLDB_DISABLE_PYTHON
220class   TypeSyntheticImpl;
221#endif
222class   Target;
223class   TargetList;
224class   Thread;
225class   ThreadList;
226class   ThreadPlan;
227class   ThreadPlanBase;
228class   ThreadPlanRunToAddress;
229class   ThreadPlanStepInstruction;
230class   ThreadPlanStepOut;
231class   ThreadPlanStepOverBreakpoint;
232class   ThreadPlanStepRange;
233class   ThreadPlanStepThrough;
234class   ThreadPlanTracer;
235class   ThreadSpec;
236class   TimeValue;
237class   Type;
238class   TypeImpl;
239class   TypeAndOrName;
240class   TypeList;
241class   TypeListImpl;
242class   TypeMemberImpl;
243class   TypeNameSpecifierImpl;
244class   UUID;
245class   Unwind;
246class   UnwindAssembly;
247class   UnwindPlan;
248class   UnwindTable;
249class   VMRange;
250class   Value;
251class   TypeFormatImpl;
252class   ValueList;
253class   ValueObject;
254class   ValueObjectChild;
255class   ValueObjectConstResult;
256class   ValueObjectConstResultChild;
257class   ValueObjectConstResultImpl;
258class   ValueObjectList;
259class   Variable;
260class   VariableList;
261class   Watchpoint;
262class   WatchpointList;
263class   WatchpointOptions;
264struct  LineEntry;
265
266} // namespace lldb_private
267
268//----------------------------------------------------------------------
269// lldb forward declarations
270//----------------------------------------------------------------------
271namespace lldb {
272
273    typedef STD_SHARED_PTR(lldb_private::ABI) ABISP;
274    typedef STD_SHARED_PTR(lldb_private::Baton) BatonSP;
275    typedef STD_SHARED_PTR(lldb_private::Block) BlockSP;
276    typedef STD_SHARED_PTR(lldb_private::Breakpoint) BreakpointSP;
277    typedef STD_WEAK_PTR(  lldb_private::Breakpoint) BreakpointWP;
278    typedef STD_SHARED_PTR(lldb_private::BreakpointSite) BreakpointSiteSP;
279    typedef STD_WEAK_PTR(  lldb_private::BreakpointSite) BreakpointSiteWP;
280    typedef STD_SHARED_PTR(lldb_private::BreakpointLocation) BreakpointLocationSP;
281    typedef STD_WEAK_PTR(  lldb_private::BreakpointLocation) BreakpointLocationWP;
282    typedef STD_SHARED_PTR(lldb_private::BreakpointResolver) BreakpointResolverSP;
283    typedef STD_SHARED_PTR(lldb_private::Broadcaster) BroadcasterSP;
284    typedef STD_SHARED_PTR(lldb_private::ClangExpressionVariable) ClangExpressionVariableSP;
285    typedef STD_SHARED_PTR(lldb_private::CommandObject) CommandObjectSP;
286    typedef STD_SHARED_PTR(lldb_private::Communication) CommunicationSP;
287    typedef STD_SHARED_PTR(lldb_private::Connection) ConnectionSP;
288    typedef STD_SHARED_PTR(lldb_private::CompileUnit) CompUnitSP;
289    typedef STD_SHARED_PTR(lldb_private::DataBuffer) DataBufferSP;
290    typedef STD_SHARED_PTR(lldb_private::DataExtractor) DataExtractorSP;
291    typedef STD_SHARED_PTR(lldb_private::Debugger) DebuggerSP;
292    typedef STD_WEAK_PTR(  lldb_private::Debugger) DebuggerWP;
293    typedef STD_SHARED_PTR(lldb_private::Disassembler) DisassemblerSP;
294    typedef STD_SHARED_PTR(lldb_private::DynamicLibrary) DynamicLibrarySP;
295    typedef STD_SHARED_PTR(lldb_private::DynamicLoader) DynamicLoaderSP;
296    typedef STD_SHARED_PTR(lldb_private::Event) EventSP;
297    typedef STD_SHARED_PTR(lldb_private::ExecutionContextRef) ExecutionContextRefSP;
298    typedef STD_SHARED_PTR(lldb_private::Function) FunctionSP;
299    typedef STD_SHARED_PTR(lldb_private::FuncUnwinders) FuncUnwindersSP;
300    typedef STD_SHARED_PTR(lldb_private::InlineFunctionInfo) InlineFunctionInfoSP;
301    typedef STD_SHARED_PTR(lldb_private::InputReader) InputReaderSP;
302    typedef STD_SHARED_PTR(lldb_private::Instruction) InstructionSP;
303    typedef STD_SHARED_PTR(lldb_private::LanguageRuntime) LanguageRuntimeSP;
304    typedef STD_SHARED_PTR(lldb_private::LineTable) LineTableSP;
305    typedef STD_SHARED_PTR(lldb_private::Listener) ListenerSP;
306    typedef STD_SHARED_PTR(lldb_private::Log) LogSP;
307    typedef STD_SHARED_PTR(lldb_private::LogChannel) LogChannelSP;
308    typedef STD_SHARED_PTR(lldb_private::Module) ModuleSP;
309    typedef STD_WEAK_PTR(  lldb_private::Module) ModuleWP;
310    typedef STD_SHARED_PTR(lldb_private::ObjectFile) ObjectFileSP;
311    typedef STD_WEAK_PTR(  lldb_private::ObjectFile) ObjectFileWP;
312    typedef STD_SHARED_PTR(lldb_private::OptionValue) OptionValueSP;
313    typedef STD_WEAK_PTR(  lldb_private::OptionValue) OptionValueWP;
314    typedef STD_SHARED_PTR(lldb_private::OptionValueArch) OptionValueArchSP;
315    typedef STD_SHARED_PTR(lldb_private::OptionValueArgs) OptionValueArgsSP;
316    typedef STD_SHARED_PTR(lldb_private::OptionValueArray) OptionValueArraySP;
317    typedef STD_SHARED_PTR(lldb_private::OptionValueBoolean) OptionValueBooleanSP;
318    typedef STD_SHARED_PTR(lldb_private::OptionValueDictionary) OptionValueDictionarySP;
319    typedef STD_SHARED_PTR(lldb_private::OptionValueFileSpec) OptionValueFileSpecSP;
320    typedef STD_SHARED_PTR(lldb_private::OptionValueFileSpecList) OptionValueFileSpecListSP;
321    typedef STD_SHARED_PTR(lldb_private::OptionValueFormat) OptionValueFormatSP;
322    typedef STD_SHARED_PTR(lldb_private::OptionValuePathMappings) OptionValuePathMappingsSP;
323    typedef STD_SHARED_PTR(lldb_private::OptionValueProperties) OptionValuePropertiesSP;
324//  typedef STD_WEAK_PTR(  lldb_private::OptionValueProperties) OptionValuePropertiesWP;
325    typedef STD_SHARED_PTR(lldb_private::OptionValueRegex) OptionValueRegexSP;
326    typedef STD_SHARED_PTR(lldb_private::OptionValueSInt64) OptionValueSInt64SP;
327    typedef STD_SHARED_PTR(lldb_private::OptionValueString) OptionValueStringSP;
328    typedef STD_SHARED_PTR(lldb_private::OptionValueUInt64) OptionValueUInt64SP;
329    typedef STD_SHARED_PTR(lldb_private::OptionValueUUID) OptionValueUUIDSP;
330    typedef STD_SHARED_PTR(lldb_private::Platform) PlatformSP;
331    typedef STD_SHARED_PTR(lldb_private::Process) ProcessSP;
332    typedef STD_SHARED_PTR(lldb_private::ProcessAttachInfo) ProcessAttachInfoSP;
333    typedef STD_SHARED_PTR(lldb_private::ProcessLaunchInfo) ProcessLaunchInfoSP;
334    typedef STD_WEAK_PTR(  lldb_private::Process) ProcessWP;
335    typedef STD_SHARED_PTR(lldb_private::Property) PropertySP;
336    typedef STD_SHARED_PTR(lldb_private::RegisterContext) RegisterContextSP;
337    typedef STD_SHARED_PTR(lldb_private::RegularExpression) RegularExpressionSP;
338    typedef STD_SHARED_PTR(lldb_private::ScriptInterpreterObject) ScriptInterpreterObjectSP;
339#ifndef LLDB_DISABLE_PYTHON
340    typedef STD_SHARED_PTR(lldb_private::ScriptSummaryFormat) ScriptSummaryFormatSP;
341#endif // #ifndef LLDB_DISABLE_PYTHON
342    typedef STD_SHARED_PTR(lldb_private::Section) SectionSP;
343    typedef STD_WEAK_PTR(  lldb_private::Section) SectionWP;
344    typedef STD_SHARED_PTR(lldb_private::SearchFilter) SearchFilterSP;
345    typedef STD_SHARED_PTR(lldb_private::Settings) SettingsSP;
346    typedef STD_SHARED_PTR(lldb_private::StackFrame) StackFrameSP;
347    typedef STD_WEAK_PTR(  lldb_private::StackFrame) StackFrameWP;
348    typedef STD_SHARED_PTR(lldb_private::StackFrameList) StackFrameListSP;
349    typedef STD_SHARED_PTR(lldb_private::StopInfo) StopInfoSP;
350    typedef STD_SHARED_PTR(lldb_private::StoppointLocation) StoppointLocationSP;
351    typedef STD_SHARED_PTR(lldb_private::Stream) StreamSP;
352    typedef STD_SHARED_PTR(lldb_private::StringSummaryFormat) StringTypeSummaryImplSP;
353    typedef STD_SHARED_PTR(lldb_private::SymbolFile) SymbolFileSP;
354    typedef STD_SHARED_PTR(lldb_private::SymbolFileType) SymbolFileTypeSP;
355    typedef STD_WEAK_PTR(  lldb_private::SymbolFileType) SymbolFileTypeWP;
356    typedef STD_SHARED_PTR(lldb_private::SymbolContextSpecifier) SymbolContextSpecifierSP;
357    typedef STD_SHARED_PTR(lldb_private::SyntheticChildren) SyntheticChildrenSP;
358    typedef STD_SHARED_PTR(lldb_private::SyntheticChildrenFrontEnd) SyntheticChildrenFrontEndSP;
359    typedef STD_SHARED_PTR(lldb_private::Target) TargetSP;
360    typedef STD_WEAK_PTR(  lldb_private::Target) TargetWP;
361    typedef STD_SHARED_PTR(lldb_private::Thread) ThreadSP;
362    typedef STD_WEAK_PTR(  lldb_private::Thread) ThreadWP;
363    typedef STD_SHARED_PTR(lldb_private::ThreadPlan) ThreadPlanSP;
364    typedef STD_SHARED_PTR(lldb_private::ThreadPlanTracer) ThreadPlanTracerSP;
365    typedef STD_SHARED_PTR(lldb_private::Type) TypeSP;
366    typedef STD_WEAK_PTR(  lldb_private::Type) TypeWP;
367    typedef STD_SHARED_PTR(lldb_private::TypeCategoryImpl) TypeCategoryImplSP;
368    typedef STD_SHARED_PTR(lldb_private::TypeImpl) TypeImplSP;
369    typedef STD_SHARED_PTR(lldb_private::TypeFilterImpl) TypeFilterImplSP;
370    typedef STD_SHARED_PTR(lldb_private::TypeFormatImpl) TypeFormatImplSP;
371    typedef STD_SHARED_PTR(lldb_private::TypeNameSpecifierImpl) TypeNameSpecifierImplSP;
372    typedef STD_SHARED_PTR(lldb_private::TypeSummaryImpl) TypeSummaryImplSP;
373#ifndef LLDB_DISABLE_PYTHON
374    typedef STD_SHARED_PTR(lldb_private::TypeSyntheticImpl) TypeSyntheticImplSP;
375#endif
376    typedef STD_SHARED_PTR(lldb_private::UnwindPlan) UnwindPlanSP;
377    typedef lldb_private::SharingPtr<lldb_private::ValueObject> ValueObjectSP;
378    typedef STD_SHARED_PTR(lldb_private::Value) ValueSP;
379    typedef STD_SHARED_PTR(lldb_private::ValueList) ValueListSP;
380    typedef STD_SHARED_PTR(lldb_private::Variable) VariableSP;
381    typedef STD_SHARED_PTR(lldb_private::VariableList) VariableListSP;
382    typedef STD_SHARED_PTR(lldb_private::ValueObjectList) ValueObjectListSP;
383    typedef STD_SHARED_PTR(lldb_private::Watchpoint) WatchpointSP;
384
385} // namespace lldb
386
387
388#endif  // #if defined(__cplusplus)
389#endif  // LLDB_lldb_forward_h_
390