Move the DIFile operand to DITypes from the 4th operand to the 2nd.
[oota-llvm.git] / include / llvm / DIBuilder.h
1 //===--- llvm/DIBuilder.h - Debug Information Builder -----------*- 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 // This file defines a DIBuilder that is useful for creating debugging 
11 // information entries in LLVM IR form.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_DIBUILDER_H
16 #define LLVM_DIBUILDER_H
17
18 #include "llvm/ADT/ArrayRef.h"
19 #include "llvm/ADT/StringRef.h"
20 #include "llvm/Support/DataTypes.h"
21
22 namespace llvm {
23   class BasicBlock;
24   class Instruction;
25   class Function;
26   class Module;
27   class Value;
28   class LLVMContext;
29   class MDNode;
30   class StringRef;
31   class DIBasicType;
32   class DICompositeType;
33   class DIDerivedType;
34   class DIDescriptor;
35   class DIFile;
36   class DIEnumerator;
37   class DIType;
38   class DIArray;
39   class DIGlobalVariable;
40   class DINameSpace;
41   class DIVariable;
42   class DISubrange;
43   class DILexicalBlockFile;
44   class DILexicalBlock;
45   class DISubprogram;
46   class DITemplateTypeParameter;
47   class DITemplateValueParameter;
48   class DIObjCProperty;
49
50   class DIBuilder {
51     private:
52     Module &M;
53     LLVMContext & VMContext;
54     MDNode *TheCU;
55
56     MDNode *TempEnumTypes;
57     MDNode *TempRetainTypes;
58     MDNode *TempSubprograms;
59     MDNode *TempGVs;
60
61     Function *DeclareFn;     // llvm.dbg.declare
62     Function *ValueFn;       // llvm.dbg.value
63
64     SmallVector<Value *, 4> AllEnumTypes;
65     SmallVector<Value *, 4> AllRetainTypes;
66     SmallVector<Value *, 4> AllSubprograms;
67     SmallVector<Value *, 4> AllGVs;
68
69     DIBuilder(const DIBuilder &) LLVM_DELETED_FUNCTION;
70     void operator=(const DIBuilder &) LLVM_DELETED_FUNCTION;
71
72     public:
73     explicit DIBuilder(Module &M);
74     const MDNode *getCU() { return TheCU; }
75     enum ComplexAddrKind { OpPlus=1, OpDeref };
76
77     /// finalize - Construct any deferred debug info descriptors.
78     void finalize();
79
80     /// createCompileUnit - A CompileUnit provides an anchor for all debugging
81     /// information generated during this instance of compilation.
82     /// @param Lang     Source programming language, eg. dwarf::DW_LANG_C99
83     /// @param File     File name
84     /// @param Dir      Directory
85     /// @param Producer String identify producer of debugging information. 
86     ///                 Usuall this is a compiler version string.
87     /// @param isOptimized A boolean flag which indicates whether optimization
88     ///                    is ON or not.
89     /// @param Flags    This string lists command line options. This string is 
90     ///                 directly embedded in debug info output which may be used
91     ///                 by a tool analyzing generated debugging information.
92     /// @param RV       This indicates runtime version for languages like 
93     ///                 Objective-C.
94     /// @param SplitName The name of the file that we'll split debug info out
95     ///                  into.
96     void createCompileUnit(unsigned Lang, StringRef File, StringRef Dir, 
97                            StringRef Producer, bool isOptimized,
98                            StringRef Flags, unsigned RV,
99                            StringRef SplitName = StringRef());
100
101     /// createFile - Create a file descriptor to hold debugging information
102     /// for a file.
103     DIFile createFile(StringRef Filename, StringRef Directory);
104                            
105     /// createEnumerator - Create a single enumerator value.
106     DIEnumerator createEnumerator(StringRef Name, uint64_t Val);
107
108     /// createNullPtrType - Create C++0x nullptr type.
109     DIType createNullPtrType(StringRef Name);
110
111     /// createBasicType - Create debugging information entry for a basic 
112     /// type.
113     /// @param Name        Type name.
114     /// @param SizeInBits  Size of the type.
115     /// @param AlignInBits Type alignment.
116     /// @param Encoding    DWARF encoding code, e.g. dwarf::DW_ATE_float.
117     DIBasicType createBasicType(StringRef Name, uint64_t SizeInBits,
118                                 uint64_t AlignInBits, unsigned Encoding);
119
120     /// createQualifiedType - Create debugging information entry for a qualified
121     /// type, e.g. 'const int'.
122     /// @param Tag         Tag identifing type, e.g. dwarf::TAG_volatile_type
123     /// @param FromTy      Base Type.
124     DIDerivedType createQualifiedType(unsigned Tag, DIType FromTy);
125
126     /// createPointerType - Create debugging information entry for a pointer.
127     /// @param PointeeTy   Type pointed by this pointer.
128     /// @param SizeInBits  Size.
129     /// @param AlignInBits Alignment. (optional)
130     /// @param Name        Pointer type name. (optional)
131     DIDerivedType
132     createPointerType(DIType PointeeTy, uint64_t SizeInBits,
133                       uint64_t AlignInBits = 0, StringRef Name = StringRef());
134
135     /// \brief Create debugging information entry for a pointer to member.
136     /// @param PointeeTy Type pointed to by this pointer.
137     /// @param Class Type for which this pointer points to members of.
138     DIDerivedType createMemberPointerType(DIType PointeeTy, DIType Class);
139
140     /// createReferenceType - Create debugging information entry for a c++
141     /// style reference or rvalue reference type.
142     DIDerivedType createReferenceType(unsigned Tag, DIType RTy);
143
144     /// createTypedef - Create debugging information entry for a typedef.
145     /// @param Ty          Original type.
146     /// @param Name        Typedef name.
147     /// @param File        File where this type is defined.
148     /// @param LineNo      Line number.
149     /// @param Context     The surrounding context for the typedef.
150     DIDerivedType createTypedef(DIType Ty, StringRef Name, DIFile File,
151                                 unsigned LineNo, DIDescriptor Context);
152
153     /// createFriend - Create debugging information entry for a 'friend'.
154     DIType createFriend(DIType Ty, DIType FriendTy);
155
156     /// createInheritance - Create debugging information entry to establish
157     /// inheritance relationship between two types.
158     /// @param Ty           Original type.
159     /// @param BaseTy       Base type. Ty is inherits from base.
160     /// @param BaseOffset   Base offset.
161     /// @param Flags        Flags to describe inheritance attribute, 
162     ///                     e.g. private
163     DIDerivedType createInheritance(DIType Ty, DIType BaseTy,
164                                     uint64_t BaseOffset, unsigned Flags);
165
166     /// createMemberType - Create debugging information entry for a member.
167     /// @param Scope        Member scope.
168     /// @param Name         Member name.
169     /// @param File         File where this member is defined.
170     /// @param LineNo       Line number.
171     /// @param SizeInBits   Member size.
172     /// @param AlignInBits  Member alignment.
173     /// @param OffsetInBits Member offset.
174     /// @param Flags        Flags to encode member attribute, e.g. private
175     /// @param Ty           Parent type.
176     DIDerivedType
177     createMemberType(DIDescriptor Scope, StringRef Name, DIFile File,
178                      unsigned LineNo, uint64_t SizeInBits, uint64_t AlignInBits,
179                      uint64_t OffsetInBits, unsigned Flags, DIType Ty);
180
181     /// createStaticMemberType - Create debugging information entry for a
182     /// C++ static data member.
183     /// @param Scope      Member scope.
184     /// @param Name       Member name.
185     /// @param File       File where this member is declared.
186     /// @param LineNo     Line number.
187     /// @param Ty         Type of the static member.
188     /// @param Flags      Flags to encode member attribute, e.g. private.
189     /// @param Val        Const initializer of the member.
190     DIType createStaticMemberType(DIDescriptor Scope, StringRef Name,
191                                   DIFile File, unsigned LineNo, DIType Ty,
192                                   unsigned Flags, llvm::Value *Val);
193
194     /// createObjCIVar - Create debugging information entry for Objective-C
195     /// instance variable.
196     /// @param Name         Member name.
197     /// @param File         File where this member is defined.
198     /// @param LineNo       Line number.
199     /// @param SizeInBits   Member size.
200     /// @param AlignInBits  Member alignment.
201     /// @param OffsetInBits Member offset.
202     /// @param Flags        Flags to encode member attribute, e.g. private
203     /// @param Ty           Parent type.
204     /// @param PropertyName Name of the Objective C property associated with
205     ///                     this ivar.
206     /// @param PropertyGetterName Name of the Objective C property getter
207     ///                           selector.
208     /// @param PropertySetterName Name of the Objective C property setter
209     ///                           selector.
210     /// @param PropertyAttributes Objective C property attributes.
211     DIType createObjCIVar(StringRef Name, DIFile File,
212                           unsigned LineNo, uint64_t SizeInBits, 
213                           uint64_t AlignInBits, uint64_t OffsetInBits, 
214                           unsigned Flags, DIType Ty,
215                           StringRef PropertyName = StringRef(),
216                           StringRef PropertyGetterName = StringRef(),
217                           StringRef PropertySetterName = StringRef(),
218                           unsigned PropertyAttributes = 0);
219
220     /// createObjCIVar - Create debugging information entry for Objective-C
221     /// instance variable.
222     /// @param Name         Member name.
223     /// @param File         File where this member is defined.
224     /// @param LineNo       Line number.
225     /// @param SizeInBits   Member size.
226     /// @param AlignInBits  Member alignment.
227     /// @param OffsetInBits Member offset.
228     /// @param Flags        Flags to encode member attribute, e.g. private
229     /// @param Ty           Parent type.
230     /// @param PropertyNode Property associated with this ivar.
231     DIType createObjCIVar(StringRef Name, DIFile File,
232                           unsigned LineNo, uint64_t SizeInBits, 
233                           uint64_t AlignInBits, uint64_t OffsetInBits, 
234                           unsigned Flags, DIType Ty,
235                           MDNode *PropertyNode);
236
237     /// createObjCProperty - Create debugging information entry for Objective-C
238     /// property.
239     /// @param Name         Property name.
240     /// @param File         File where this property is defined.
241     /// @param LineNumber   Line number.
242     /// @param GetterName   Name of the Objective C property getter selector.
243     /// @param SetterName   Name of the Objective C property setter selector.
244     /// @param PropertyAttributes Objective C property attributes.
245     /// @param Ty           Type.
246     DIObjCProperty createObjCProperty(StringRef Name,
247                                       DIFile File, unsigned LineNumber,
248                                       StringRef GetterName,
249                                       StringRef SetterName,
250                                       unsigned PropertyAttributes,
251                                       DIType Ty);
252       
253     /// createClassType - Create debugging information entry for a class.
254     /// @param Scope        Scope in which this class is defined.
255     /// @param Name         class name.
256     /// @param File         File where this member is defined.
257     /// @param LineNumber   Line number.
258     /// @param SizeInBits   Member size.
259     /// @param AlignInBits  Member alignment.
260     /// @param OffsetInBits Member offset.
261     /// @param Flags        Flags to encode member attribute, e.g. private
262     /// @param Elements     class members.
263     /// @param VTableHolder Debug info of the base class that contains vtable
264     ///                     for this type. This is used in 
265     ///                     DW_AT_containing_type. See DWARF documentation
266     ///                     for more info.
267     /// @param TemplateParms Template type parameters.
268     DIType createClassType(DIDescriptor Scope, StringRef Name, DIFile File,
269                            unsigned LineNumber, uint64_t SizeInBits,
270                            uint64_t AlignInBits, uint64_t OffsetInBits,
271                            unsigned Flags, DIType DerivedFrom, 
272                            DIArray Elements, MDNode *VTableHolder = 0,
273                            MDNode *TemplateParms = 0);
274
275     /// createStructType - Create debugging information entry for a struct.
276     /// @param Scope        Scope in which this struct is defined.
277     /// @param Name         Struct name.
278     /// @param File         File where this member is defined.
279     /// @param LineNumber   Line number.
280     /// @param SizeInBits   Member size.
281     /// @param AlignInBits  Member alignment.
282     /// @param Flags        Flags to encode member attribute, e.g. private
283     /// @param Elements     Struct elements.
284     /// @param RunTimeLang  Optional parameter, Objective-C runtime version.
285     DICompositeType createStructType(DIDescriptor Scope, StringRef Name,
286                                      DIFile File, unsigned LineNumber,
287                                      uint64_t SizeInBits, uint64_t AlignInBits,
288                                      unsigned Flags, DIType DerivedFrom,
289                                      DIArray Elements, unsigned RunTimeLang = 0,
290                                      MDNode *VTableHolder = 0);
291
292     /// createUnionType - Create debugging information entry for an union.
293     /// @param Scope        Scope in which this union is defined.
294     /// @param Name         Union name.
295     /// @param File         File where this member is defined.
296     /// @param LineNumber   Line number.
297     /// @param SizeInBits   Member size.
298     /// @param AlignInBits  Member alignment.
299     /// @param Flags        Flags to encode member attribute, e.g. private
300     /// @param Elements     Union elements.
301     /// @param RunTimeLang  Optional parameter, Objective-C runtime version.
302     DICompositeType createUnionType(
303         DIDescriptor Scope, StringRef Name, DIFile File, unsigned LineNumber,
304         uint64_t SizeInBits, uint64_t AlignInBits, unsigned Flags,
305         DIArray Elements, unsigned RunTimeLang = 0);
306
307     /// createTemplateTypeParameter - Create debugging information for template
308     /// type parameter.
309     /// @param Scope        Scope in which this type is defined.
310     /// @param Name         Type parameter name.
311     /// @param Ty           Parameter type.
312     /// @param File         File where this type parameter is defined.
313     /// @param LineNo       Line number.
314     /// @param ColumnNo     Column Number.
315     DITemplateTypeParameter
316     createTemplateTypeParameter(DIDescriptor Scope, StringRef Name, DIType Ty,
317                                 MDNode *File = 0, unsigned LineNo = 0,
318                                 unsigned ColumnNo = 0);
319
320     /// createTemplateValueParameter - Create debugging information for template
321     /// value parameter.
322     /// @param Scope        Scope in which this type is defined.
323     /// @param Name         Value parameter name.
324     /// @param Ty           Parameter type.
325     /// @param Value        Constant parameter value.
326     /// @param File         File where this type parameter is defined.
327     /// @param LineNo       Line number.
328     /// @param ColumnNo     Column Number.
329     DITemplateValueParameter
330     createTemplateValueParameter(DIDescriptor Scope, StringRef Name, DIType Ty,
331                                  uint64_t Value,
332                                  MDNode *File = 0, unsigned LineNo = 0,
333                                  unsigned ColumnNo = 0);
334
335     /// createArrayType - Create debugging information entry for an array.
336     /// @param Size         Array size.
337     /// @param AlignInBits  Alignment.
338     /// @param Ty           Element type.
339     /// @param Subscripts   Subscripts.
340     DICompositeType createArrayType(uint64_t Size, uint64_t AlignInBits,
341                                     DIType Ty, DIArray Subscripts);
342
343     /// createVectorType - Create debugging information entry for a vector type.
344     /// @param Size         Array size.
345     /// @param AlignInBits  Alignment.
346     /// @param Ty           Element type.
347     /// @param Subscripts   Subscripts.
348     DIType createVectorType(uint64_t Size, uint64_t AlignInBits, 
349                             DIType Ty, DIArray Subscripts);
350
351     /// createEnumerationType - Create debugging information entry for an 
352     /// enumeration.
353     /// @param Scope        Scope in which this enumeration is defined.
354     /// @param Name         Union name.
355     /// @param File         File where this member is defined.
356     /// @param LineNumber   Line number.
357     /// @param SizeInBits   Member size.
358     /// @param AlignInBits  Member alignment.
359     /// @param Elements     Enumeration elements.
360     DICompositeType createEnumerationType(
361         DIDescriptor Scope, StringRef Name, DIFile File, unsigned LineNumber,
362         uint64_t SizeInBits, uint64_t AlignInBits, DIArray Elements,
363         DIType ClassType);
364
365     /// createSubroutineType - Create subroutine type.
366     /// @param File           File in which this subroutine is defined.
367     /// @param ParameterTypes An array of subroutine parameter types. This
368     ///                       includes return type at 0th index.
369     DICompositeType createSubroutineType(DIFile File, DIArray ParameterTypes);
370
371     /// createArtificialType - Create a new DIType with "artificial" flag set.
372     DIType createArtificialType(DIType Ty);
373
374     /// createObjectPointerType - Create a new DIType with the "object pointer"
375     /// flag set.
376     DIType createObjectPointerType(DIType Ty);
377
378     /// createForwardDecl - Create a temporary forward-declared type.
379     DIType createForwardDecl(unsigned Tag, StringRef Name, DIDescriptor Scope,
380                              DIFile F, unsigned Line, unsigned RuntimeLang = 0,
381                              uint64_t SizeInBits = 0, uint64_t AlignInBits = 0);
382
383     /// retainType - Retain DIType in a module even if it is not referenced 
384     /// through debug info anchors.
385     void retainType(DIType T);
386
387     /// createUnspecifiedParameter - Create unspeicified type descriptor
388     /// for a subroutine type.
389     DIDescriptor createUnspecifiedParameter();
390
391     /// getOrCreateArray - Get a DIArray, create one if required.
392     DIArray getOrCreateArray(ArrayRef<Value *> Elements);
393
394     /// getOrCreateSubrange - Create a descriptor for a value range.  This
395     /// implicitly uniques the values returned.
396     DISubrange getOrCreateSubrange(int64_t Lo, int64_t Count);
397
398     /// createGlobalVariable - Create a new descriptor for the specified global.
399     /// @param Name        Name of the variable.
400     /// @param File        File where this variable is defined.
401     /// @param LineNo      Line number.
402     /// @param Ty          Variable Type.
403     /// @param isLocalToUnit Boolean flag indicate whether this variable is
404     ///                      externally visible or not.
405     /// @param Val         llvm::Value of the variable.
406     DIGlobalVariable
407     createGlobalVariable(StringRef Name, DIFile File, unsigned LineNo,
408                          DIType Ty, bool isLocalToUnit, llvm::Value *Val);
409
410
411     /// createStaticVariable - Create a new descriptor for the specified 
412     /// variable.
413     /// @param Context     Variable scope.
414     /// @param Name        Name of the variable.
415     /// @param LinkageName Mangled  name of the variable.
416     /// @param File        File where this variable is defined.
417     /// @param LineNo      Line number.
418     /// @param Ty          Variable Type.
419     /// @param isLocalToUnit Boolean flag indicate whether this variable is
420     ///                      externally visible or not.
421     /// @param Val         llvm::Value of the variable.
422     /// @param Decl        Reference to the corresponding declaration.
423     DIGlobalVariable
424     createStaticVariable(DIDescriptor Context, StringRef Name, 
425                          StringRef LinkageName, DIFile File, unsigned LineNo, 
426                          DIType Ty, bool isLocalToUnit, llvm::Value *Val,
427                          MDNode *Decl = NULL);
428
429
430     /// createLocalVariable - Create a new descriptor for the specified 
431     /// local variable.
432     /// @param Tag         Dwarf TAG. Usually DW_TAG_auto_variable or
433     ///                    DW_TAG_arg_variable.
434     /// @param Scope       Variable scope.
435     /// @param Name        Variable name.
436     /// @param File        File where this variable is defined.
437     /// @param LineNo      Line number.
438     /// @param Ty          Variable Type
439     /// @param AlwaysPreserve Boolean. Set to true if debug info for this
440     ///                       variable should be preserved in optimized build.
441     /// @param Flags          Flags, e.g. artificial variable.
442     /// @param ArgNo       If this variable is an arugment then this argument's
443     ///                    number. 1 indicates 1st argument.
444     DIVariable createLocalVariable(unsigned Tag, DIDescriptor Scope,
445                                    StringRef Name,
446                                    DIFile File, unsigned LineNo,
447                                    DIType Ty, bool AlwaysPreserve = false,
448                                    unsigned Flags = 0,
449                                    unsigned ArgNo = 0);
450
451
452     /// createComplexVariable - Create a new descriptor for the specified
453     /// variable which has a complex address expression for its address.
454     /// @param Tag         Dwarf TAG. Usually DW_TAG_auto_variable or
455     ///                    DW_TAG_arg_variable.
456     /// @param Scope       Variable scope.
457     /// @param Name        Variable name.
458     /// @param F           File where this variable is defined.
459     /// @param LineNo      Line number.
460     /// @param Ty          Variable Type
461     /// @param Addr        An array of complex address operations.
462     /// @param ArgNo       If this variable is an arugment then this argument's
463     ///                    number. 1 indicates 1st argument.
464     DIVariable createComplexVariable(unsigned Tag, DIDescriptor Scope,
465                                      StringRef Name, DIFile F, unsigned LineNo,
466                                      DIType Ty, ArrayRef<Value *> Addr,
467                                      unsigned ArgNo = 0);
468
469     /// createFunction - Create a new descriptor for the specified subprogram.
470     /// See comments in DISubprogram for descriptions of these fields.
471     /// @param Scope         Function scope.
472     /// @param Name          Function name.
473     /// @param LinkageName   Mangled function name.
474     /// @param File          File where this variable is defined.
475     /// @param LineNo        Line number.
476     /// @param Ty            Function type.
477     /// @param isLocalToUnit True if this function is not externally visible..
478     /// @param isDefinition  True if this is a function definition.
479     /// @param ScopeLine     Set to the beginning of the scope this starts
480     /// @param Flags         e.g. is this function prototyped or not.
481     ///                      This flags are used to emit dwarf attributes.
482     /// @param isOptimized   True if optimization is ON.
483     /// @param Fn            llvm::Function pointer.
484     /// @param TParam        Function template parameters.
485     DISubprogram createFunction(DIDescriptor Scope, StringRef Name,
486                                 StringRef LinkageName,
487                                 DIFile File, unsigned LineNo,
488                                 DIType Ty, bool isLocalToUnit,
489                                 bool isDefinition,
490                                 unsigned ScopeLine,
491                                 unsigned Flags = 0,
492                                 bool isOptimized = false,
493                                 Function *Fn = 0,
494                                 MDNode *TParam = 0,
495                                 MDNode *Decl = 0);
496
497     /// createMethod - Create a new descriptor for the specified C++ method.
498     /// See comments in DISubprogram for descriptions of these fields.
499     /// @param Scope         Function scope.
500     /// @param Name          Function name.
501     /// @param LinkageName   Mangled function name.
502     /// @param File          File where this variable is defined.
503     /// @param LineNo        Line number.
504     /// @param Ty            Function type.
505     /// @param isLocalToUnit True if this function is not externally visible..
506     /// @param isDefinition  True if this is a function definition.
507     /// @param Virtuality    Attributes describing virtualness. e.g. pure 
508     ///                      virtual function.
509     /// @param VTableIndex   Index no of this method in virtual table.
510     /// @param VTableHolder  Type that holds vtable.
511     /// @param Flags         e.g. is this function prototyped or not.
512     ///                      This flags are used to emit dwarf attributes.
513     /// @param isOptimized   True if optimization is ON.
514     /// @param Fn            llvm::Function pointer.
515     /// @param TParam        Function template parameters.
516     DISubprogram createMethod(DIDescriptor Scope, StringRef Name,
517                               StringRef LinkageName,
518                               DIFile File, unsigned LineNo,
519                               DIType Ty, bool isLocalToUnit,
520                               bool isDefinition,
521                               unsigned Virtuality = 0, unsigned VTableIndex = 0,
522                               MDNode *VTableHolder = 0,
523                               unsigned Flags = 0,
524                               bool isOptimized = false,
525                               Function *Fn = 0,
526                               MDNode *TParam = 0);
527
528     /// createNameSpace - This creates new descriptor for a namespace
529     /// with the specified parent scope.
530     /// @param Scope       Namespace scope
531     /// @param Name        Name of this namespace
532     /// @param File        Source file
533     /// @param LineNo      Line number
534     DINameSpace createNameSpace(DIDescriptor Scope, StringRef Name,
535                                 DIFile File, unsigned LineNo);
536
537
538     /// createLexicalBlockFile - This creates a descriptor for a lexical
539     /// block with a new file attached. This merely extends the existing
540     /// lexical block as it crosses a file.
541     /// @param Scope       Lexical block.
542     /// @param File        Source file.
543     DILexicalBlockFile createLexicalBlockFile(DIDescriptor Scope,
544                                               DIFile File);
545     
546     /// createLexicalBlock - This creates a descriptor for a lexical block
547     /// with the specified parent context.
548     /// @param Scope       Parent lexical scope.
549     /// @param File        Source file
550     /// @param Line        Line number
551     /// @param Col         Column number
552     DILexicalBlock createLexicalBlock(DIDescriptor Scope, DIFile File,
553                                       unsigned Line, unsigned Col);
554
555     /// insertDeclare - Insert a new llvm.dbg.declare intrinsic call.
556     /// @param Storage     llvm::Value of the variable
557     /// @param VarInfo     Variable's debug info descriptor.
558     /// @param InsertAtEnd Location for the new intrinsic.
559     Instruction *insertDeclare(llvm::Value *Storage, DIVariable VarInfo,
560                                BasicBlock *InsertAtEnd);
561
562     /// insertDeclare - Insert a new llvm.dbg.declare intrinsic call.
563     /// @param Storage      llvm::Value of the variable
564     /// @param VarInfo      Variable's debug info descriptor.
565     /// @param InsertBefore Location for the new intrinsic.
566     Instruction *insertDeclare(llvm::Value *Storage, DIVariable VarInfo,
567                                Instruction *InsertBefore);
568
569
570     /// insertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call.
571     /// @param Val          llvm::Value of the variable
572     /// @param Offset       Offset
573     /// @param VarInfo      Variable's debug info descriptor.
574     /// @param InsertAtEnd Location for the new intrinsic.
575     Instruction *insertDbgValueIntrinsic(llvm::Value *Val, uint64_t Offset,
576                                          DIVariable VarInfo, 
577                                          BasicBlock *InsertAtEnd);
578     
579     /// insertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call.
580     /// @param Val          llvm::Value of the variable
581     /// @param Offset       Offset
582     /// @param VarInfo      Variable's debug info descriptor.
583     /// @param InsertBefore Location for the new intrinsic.
584     Instruction *insertDbgValueIntrinsic(llvm::Value *Val, uint64_t Offset,
585                                          DIVariable VarInfo, 
586                                          Instruction *InsertBefore);
587
588   };
589 } // end namespace llvm
590
591 #endif