lldb-forward.h revision 6d101887bb427b3c879c0c06775ab4dcb1cd265b
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   Event;
102class   EventData;
103class   ExecutionContext;
104class   ExecutionContextRef;
105class   ExecutionContextRefLocker;
106class   ExecutionContextScope;
107class   FileSpec;
108class   FileSpecList;
109class   Flags;
110class   TypeCategoryImpl;
111class   FormatManager;
112class   FuncUnwinders;
113class   Function;
114class   FunctionInfo;
115class   InlineFunctionInfo;
116class   InputReader;
117class   Instruction;
118class   InstructionList;
119class   LanguageRuntime;
120class   LineTable;
121class   Listener;
122class   Log;
123class   LogChannel;
124class   Mangled;
125class   Module;
126class   ModuleList;
127class   ModuleSpec;
128class   Mutex;
129struct  NameSearchContext;
130class   ObjCLanguageRuntime;
131class   ObjectContainer;
132class   OptionGroup;
133class   OptionGroupPlatform;
134class   ObjectFile;
135class   OperatingSystem;
136class   Options;
137class   OptionValue;
138class   OptionValueArch;
139class   OptionValueArgs;
140class   OptionValueArray;
141class   OptionValueBoolean;
142class   OptionValueDictionary;
143class   OptionValueEnumeration;
144class   OptionValueFileSpec;
145class   OptionValueFileSpecList;
146class   OptionValueFormat;
147class   OptionValuePathMappings;
148class   OptionValueProperties;
149class   OptionValueRegex;
150class   OptionValueSInt64;
151class   OptionValueString;
152class   OptionValueUInt64;
153class   OptionValueUUID;
154class   NamedOption;
155class   PathMappingList;
156class   Platform;
157class   Process;
158class   ProcessAttachInfo;
159class   ProcessModID;
160class   ProcessInfo;
161class   ProcessInstanceInfo;
162class   ProcessInstanceInfoList;
163class   ProcessInstanceInfoMatch;
164class   ProcessLaunchInfo;
165class   Property;
166struct  PropertyDefinition;
167class   PythonDataArray;
168class   PythonDataDictionary;
169class   PythonDataInteger;
170class   PythonDataObject;
171class   PythonDataString;
172class   RegisterContext;
173class   RegisterLocation;
174class   RegisterLocationList;
175class   RegisterValue;
176class   RegularExpression;
177class   Scalar;
178class   ScriptInterpreter;
179class   ScriptInterpreterObject;
180#ifndef LLDB_DISABLE_PYTHON
181class   ScriptInterpreterPython;
182struct  ScriptSummaryFormat;
183#endif
184class   SearchFilter;
185class   Section;
186class   SectionImpl;
187class   SectionList;
188class   Settings;
189class   SourceManager;
190class   SourceManagerImpl;
191class   StackFrame;
192class   StackFrameImpl;
193class   StackFrameList;
194class   StackID;
195class   StopInfo;
196class   Stoppoint;
197class   StoppointCallbackContext;
198class   StoppointLocation;
199class   Stream;
200template <unsigned N> class StreamBuffer;
201class   StreamFile;
202class   StreamString;
203class   StringList;
204struct  StringSummaryFormat;
205class   TypeSummaryImpl;
206class   Symbol;
207class   SymbolContext;
208class   SymbolContextList;
209class   SymbolContextScope;
210class   SymbolContextSpecifier;
211class   SymbolFile;
212class   SymbolFileType;
213class   SymbolVendor;
214class   Symtab;
215class   SyntheticChildren;
216class   SyntheticChildrenFrontEnd;
217class   TypeFilterImpl;
218#ifndef LLDB_DISABLE_PYTHON
219class   TypeSyntheticImpl;
220#endif
221class   Target;
222class   TargetList;
223class   Thread;
224class   ThreadList;
225class   ThreadPlan;
226class   ThreadPlanBase;
227class   ThreadPlanRunToAddress;
228class   ThreadPlanStepInstruction;
229class   ThreadPlanStepOut;
230class   ThreadPlanStepOverBreakpoint;
231class   ThreadPlanStepRange;
232class   ThreadPlanStepThrough;
233class   ThreadPlanTracer;
234class   ThreadSpec;
235class   TimeValue;
236class   Type;
237class   TypeImpl;
238class   TypeAndOrName;
239class   TypeList;
240class   TypeListImpl;
241class   TypeMemberImpl;
242class   TypeNameSpecifierImpl;
243class   UUID;
244class   Unwind;
245class   UnwindAssembly;
246class   UnwindPlan;
247class   UnwindTable;
248class   VMRange;
249class   Value;
250class   TypeFormatImpl;
251class   ValueList;
252class   ValueObject;
253class   ValueObjectChild;
254class   ValueObjectConstResult;
255class   ValueObjectConstResultChild;
256class   ValueObjectConstResultImpl;
257class   ValueObjectList;
258class   Variable;
259class   VariableList;
260class   Watchpoint;
261class   WatchpointList;
262class   WatchpointOptions;
263struct  LineEntry;
264
265} // namespace lldb_private
266
267//----------------------------------------------------------------------
268// lldb forward declarations
269//----------------------------------------------------------------------
270namespace lldb {
271
272    typedef STD_SHARED_PTR(lldb_private::ABI) ABISP;
273    typedef STD_SHARED_PTR(lldb_private::Baton) BatonSP;
274    typedef STD_SHARED_PTR(lldb_private::Block) BlockSP;
275    typedef STD_SHARED_PTR(lldb_private::Breakpoint) BreakpointSP;
276    typedef STD_WEAK_PTR(  lldb_private::Breakpoint) BreakpointWP;
277    typedef STD_SHARED_PTR(lldb_private::BreakpointSite) BreakpointSiteSP;
278    typedef STD_WEAK_PTR(  lldb_private::BreakpointSite) BreakpointSiteWP;
279    typedef STD_SHARED_PTR(lldb_private::BreakpointLocation) BreakpointLocationSP;
280    typedef STD_WEAK_PTR(  lldb_private::BreakpointLocation) BreakpointLocationWP;
281    typedef STD_SHARED_PTR(lldb_private::BreakpointResolver) BreakpointResolverSP;
282    typedef STD_SHARED_PTR(lldb_private::Broadcaster) BroadcasterSP;
283    typedef STD_SHARED_PTR(lldb_private::ClangExpressionVariable) ClangExpressionVariableSP;
284    typedef STD_SHARED_PTR(lldb_private::CommandObject) CommandObjectSP;
285    typedef STD_SHARED_PTR(lldb_private::Communication) CommunicationSP;
286    typedef STD_SHARED_PTR(lldb_private::Connection) ConnectionSP;
287    typedef STD_SHARED_PTR(lldb_private::CompileUnit) CompUnitSP;
288    typedef STD_SHARED_PTR(lldb_private::DataBuffer) DataBufferSP;
289    typedef STD_SHARED_PTR(lldb_private::DataExtractor) DataExtractorSP;
290    typedef STD_SHARED_PTR(lldb_private::Debugger) DebuggerSP;
291    typedef STD_WEAK_PTR(  lldb_private::Debugger) DebuggerWP;
292    typedef STD_SHARED_PTR(lldb_private::Disassembler) DisassemblerSP;
293    typedef STD_SHARED_PTR(lldb_private::DynamicLibrary) DynamicLibrarySP;
294    typedef STD_SHARED_PTR(lldb_private::DynamicLoader) DynamicLoaderSP;
295    typedef STD_SHARED_PTR(lldb_private::Event) EventSP;
296    typedef STD_SHARED_PTR(lldb_private::ExecutionContextRef) ExecutionContextRefSP;
297    typedef STD_SHARED_PTR(lldb_private::Function) FunctionSP;
298    typedef STD_SHARED_PTR(lldb_private::FuncUnwinders) FuncUnwindersSP;
299    typedef STD_SHARED_PTR(lldb_private::InlineFunctionInfo) InlineFunctionInfoSP;
300    typedef STD_SHARED_PTR(lldb_private::InputReader) InputReaderSP;
301    typedef STD_SHARED_PTR(lldb_private::Instruction) InstructionSP;
302    typedef STD_SHARED_PTR(lldb_private::LanguageRuntime) LanguageRuntimeSP;
303    typedef STD_SHARED_PTR(lldb_private::LineTable) LineTableSP;
304    typedef STD_SHARED_PTR(lldb_private::Listener) ListenerSP;
305    typedef STD_SHARED_PTR(lldb_private::Log) LogSP;
306    typedef STD_SHARED_PTR(lldb_private::LogChannel) LogChannelSP;
307    typedef STD_SHARED_PTR(lldb_private::Module) ModuleSP;
308    typedef STD_WEAK_PTR(  lldb_private::Module) ModuleWP;
309    typedef STD_SHARED_PTR(lldb_private::ObjectFile) ObjectFileSP;
310    typedef STD_WEAK_PTR(  lldb_private::ObjectFile) ObjectFileWP;
311    typedef STD_SHARED_PTR(lldb_private::OptionValue) OptionValueSP;
312    typedef STD_WEAK_PTR(  lldb_private::OptionValue) OptionValueWP;
313    typedef STD_SHARED_PTR(lldb_private::OptionValueArch) OptionValueArchSP;
314    typedef STD_SHARED_PTR(lldb_private::OptionValueArgs) OptionValueArgsSP;
315    typedef STD_SHARED_PTR(lldb_private::OptionValueArray) OptionValueArraySP;
316    typedef STD_SHARED_PTR(lldb_private::OptionValueBoolean) OptionValueBooleanSP;
317    typedef STD_SHARED_PTR(lldb_private::OptionValueDictionary) OptionValueDictionarySP;
318    typedef STD_SHARED_PTR(lldb_private::OptionValueFileSpec) OptionValueFileSpecSP;
319    typedef STD_SHARED_PTR(lldb_private::OptionValueFileSpecList) OptionValueFileSpecListSP;
320    typedef STD_SHARED_PTR(lldb_private::OptionValueFormat) OptionValueFormatSP;
321    typedef STD_SHARED_PTR(lldb_private::OptionValuePathMappings) OptionValuePathMappingsSP;
322    typedef STD_SHARED_PTR(lldb_private::OptionValueProperties) OptionValuePropertiesSP;
323//  typedef STD_WEAK_PTR(  lldb_private::OptionValueProperties) OptionValuePropertiesWP;
324    typedef STD_SHARED_PTR(lldb_private::OptionValueRegex) OptionValueRegexSP;
325    typedef STD_SHARED_PTR(lldb_private::OptionValueSInt64) OptionValueSInt64SP;
326    typedef STD_SHARED_PTR(lldb_private::OptionValueString) OptionValueStringSP;
327    typedef STD_SHARED_PTR(lldb_private::OptionValueUInt64) OptionValueUInt64SP;
328    typedef STD_SHARED_PTR(lldb_private::OptionValueUUID) OptionValueUUIDSP;
329    typedef STD_SHARED_PTR(lldb_private::Platform) PlatformSP;
330    typedef STD_SHARED_PTR(lldb_private::Process) ProcessSP;
331    typedef STD_SHARED_PTR(lldb_private::ProcessAttachInfo) ProcessAttachInfoSP;
332    typedef STD_SHARED_PTR(lldb_private::ProcessLaunchInfo) ProcessLaunchInfoSP;
333    typedef STD_WEAK_PTR(  lldb_private::Process) ProcessWP;
334    typedef STD_SHARED_PTR(lldb_private::Property) PropertySP;
335    typedef STD_SHARED_PTR(lldb_private::RegisterContext) RegisterContextSP;
336    typedef STD_SHARED_PTR(lldb_private::RegularExpression) RegularExpressionSP;
337    typedef STD_SHARED_PTR(lldb_private::ScriptInterpreterObject) ScriptInterpreterObjectSP;
338#ifndef LLDB_DISABLE_PYTHON
339    typedef STD_SHARED_PTR(lldb_private::ScriptSummaryFormat) ScriptSummaryFormatSP;
340#endif // #ifndef LLDB_DISABLE_PYTHON
341    typedef STD_SHARED_PTR(lldb_private::Section) SectionSP;
342    typedef STD_WEAK_PTR(  lldb_private::Section) SectionWP;
343    typedef STD_SHARED_PTR(lldb_private::SearchFilter) SearchFilterSP;
344    typedef STD_SHARED_PTR(lldb_private::Settings) SettingsSP;
345    typedef STD_SHARED_PTR(lldb_private::StackFrame) StackFrameSP;
346    typedef STD_WEAK_PTR(  lldb_private::StackFrame) StackFrameWP;
347    typedef STD_SHARED_PTR(lldb_private::StackFrameList) StackFrameListSP;
348    typedef STD_SHARED_PTR(lldb_private::StopInfo) StopInfoSP;
349    typedef STD_SHARED_PTR(lldb_private::StoppointLocation) StoppointLocationSP;
350    typedef STD_SHARED_PTR(lldb_private::Stream) StreamSP;
351    typedef STD_SHARED_PTR(lldb_private::StringSummaryFormat) StringTypeSummaryImplSP;
352    typedef STD_SHARED_PTR(lldb_private::SymbolFile) SymbolFileSP;
353    typedef STD_SHARED_PTR(lldb_private::SymbolFileType) SymbolFileTypeSP;
354    typedef STD_WEAK_PTR(  lldb_private::SymbolFileType) SymbolFileTypeWP;
355    typedef STD_SHARED_PTR(lldb_private::SymbolContextSpecifier) SymbolContextSpecifierSP;
356    typedef STD_SHARED_PTR(lldb_private::SyntheticChildren) SyntheticChildrenSP;
357    typedef STD_SHARED_PTR(lldb_private::SyntheticChildrenFrontEnd) SyntheticChildrenFrontEndSP;
358    typedef STD_SHARED_PTR(lldb_private::Target) TargetSP;
359    typedef STD_WEAK_PTR(  lldb_private::Target) TargetWP;
360    typedef STD_SHARED_PTR(lldb_private::Thread) ThreadSP;
361    typedef STD_WEAK_PTR(  lldb_private::Thread) ThreadWP;
362    typedef STD_SHARED_PTR(lldb_private::ThreadPlan) ThreadPlanSP;
363    typedef STD_SHARED_PTR(lldb_private::ThreadPlanTracer) ThreadPlanTracerSP;
364    typedef STD_SHARED_PTR(lldb_private::Type) TypeSP;
365    typedef STD_WEAK_PTR(  lldb_private::Type) TypeWP;
366    typedef STD_SHARED_PTR(lldb_private::TypeCategoryImpl) TypeCategoryImplSP;
367    typedef STD_SHARED_PTR(lldb_private::TypeImpl) TypeImplSP;
368    typedef STD_SHARED_PTR(lldb_private::TypeFilterImpl) TypeFilterImplSP;
369    typedef STD_SHARED_PTR(lldb_private::TypeFormatImpl) TypeFormatImplSP;
370    typedef STD_SHARED_PTR(lldb_private::TypeNameSpecifierImpl) TypeNameSpecifierImplSP;
371    typedef STD_SHARED_PTR(lldb_private::TypeSummaryImpl) TypeSummaryImplSP;
372#ifndef LLDB_DISABLE_PYTHON
373    typedef STD_SHARED_PTR(lldb_private::TypeSyntheticImpl) TypeSyntheticImplSP;
374#endif
375    typedef STD_SHARED_PTR(lldb_private::UnwindPlan) UnwindPlanSP;
376    typedef lldb_private::SharingPtr<lldb_private::ValueObject> ValueObjectSP;
377    typedef STD_SHARED_PTR(lldb_private::Value) ValueSP;
378    typedef STD_SHARED_PTR(lldb_private::ValueList) ValueListSP;
379    typedef STD_SHARED_PTR(lldb_private::Variable) VariableSP;
380    typedef STD_SHARED_PTR(lldb_private::VariableList) VariableListSP;
381    typedef STD_SHARED_PTR(lldb_private::ValueObjectList) ValueObjectListSP;
382    typedef STD_SHARED_PTR(lldb_private::Watchpoint) WatchpointSP;
383
384} // namespace lldb
385
386
387#endif  // #if defined(__cplusplus)
388#endif  // LLDB_lldb_forward_h_
389