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