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