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