LLVM 20.0.0git
DebugInfo.h
Go to the documentation of this file.
1//===------------ DebugInfo.h - LLVM C API Debug Info API -----------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8///
9/// This file declares the C API endpoints for generating DWARF Debug Info
10///
11/// Note: This interface is experimental. It is *NOT* stable, and may be
12/// changed without warning.
13///
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_C_DEBUGINFO_H
17#define LLVM_C_DEBUGINFO_H
18
19#include "llvm-c/ExternC.h"
20#include "llvm-c/Types.h"
21
23
24/**
25 * @defgroup LLVMCCoreDebugInfo Debug Information
26 * @ingroup LLVMCCore
27 *
28 * @{
29 */
30
31/**
32 * Debug info flags.
33 */
34typedef enum {
63 LLVMDIFlagThunk = 1 << 25,
67 LLVMDIFlagIndirectVirtualBase = (1 << 2) | (1 << 5),
74
75/**
76 * Source languages known by DWARF.
77 */
78typedef enum {
89 // New in DWARF v3:
99 // New in DWARF v4:
101 // New in DWARF v5:
142
143 // Vendor extensions:
148
149/**
150 * The amount of debug information to emit.
151 */
152typedef enum {
157
158/**
159 * The kind of metadata nodes.
160 */
161enum {
198};
199typedef unsigned LLVMMetadataKind;
200
201/**
202 * An LLVM DWARF type encoding.
203 */
204typedef unsigned LLVMDWARFTypeEncoding;
205
206/**
207 * Describes the kind of macro declaration used for LLVMDIBuilderCreateMacro.
208 * @see llvm::dwarf::MacinfoRecordType
209 * @note Values are from DW_MACINFO_* constants in the DWARF specification.
210 */
211typedef enum {
218
219/**
220 * The current debug metadata version number.
221 */
222unsigned LLVMDebugMetadataVersion(void);
223
224/**
225 * The version of debug metadata that's present in the provided \c Module.
226 */
228
229/**
230 * Strip debug info in the module if it exists.
231 * To do this, we remove all calls to the debugger intrinsics and any named
232 * metadata for debugging. We also remove debug locations for instructions.
233 * Return true if module is modified.
234 */
236
237/**
238 * Construct a builder for a module, and do not allow for unresolved nodes
239 * attached to the module.
240 */
242
243/**
244 * Construct a builder for a module and collect unresolved nodes attached
245 * to the module in order to resolve cycles during a call to
246 * \c LLVMDIBuilderFinalize.
247 */
249
250/**
251 * Deallocates the \c DIBuilder and everything it owns.
252 * @note You must call \c LLVMDIBuilderFinalize before this
253 */
255
256/**
257 * Construct any deferred debug info descriptors.
258 */
260
261/**
262 * Finalize a specific subprogram.
263 * No new variables may be added to this subprogram afterwards.
264 */
266 LLVMMetadataRef Subprogram);
267
268/**
269 * A CompileUnit provides an anchor for all debugging
270 * information generated during this instance of compilation.
271 * \param Lang Source programming language, eg.
272 * \c LLVMDWARFSourceLanguageC99
273 * \param FileRef File info.
274 * \param Producer Identify the producer of debugging information
275 * and code. Usually this is a compiler
276 * version string.
277 * \param ProducerLen The length of the C string passed to \c Producer.
278 * \param isOptimized A boolean flag which indicates whether optimization
279 * is enabled or not.
280 * \param Flags This string lists command line options. This
281 * string is directly embedded in debug info
282 * output which may be used by a tool
283 * analyzing generated debugging information.
284 * \param FlagsLen The length of the C string passed to \c Flags.
285 * \param RuntimeVer This indicates runtime version for languages like
286 * Objective-C.
287 * \param SplitName The name of the file that we'll split debug info
288 * out into.
289 * \param SplitNameLen The length of the C string passed to \c SplitName.
290 * \param Kind The kind of debug information to generate.
291 * \param DWOId The DWOId if this is a split skeleton compile unit.
292 * \param SplitDebugInlining Whether to emit inline debug info.
293 * \param DebugInfoForProfiling Whether to emit extra debug info for
294 * profile collection.
295 * \param SysRoot The Clang system root (value of -isysroot).
296 * \param SysRootLen The length of the C string passed to \c SysRoot.
297 * \param SDK The SDK. On Darwin, the last component of the sysroot.
298 * \param SDKLen The length of the C string passed to \c SDK.
299 */
302 LLVMMetadataRef FileRef, const char *Producer, size_t ProducerLen,
303 LLVMBool isOptimized, const char *Flags, size_t FlagsLen,
304 unsigned RuntimeVer, const char *SplitName, size_t SplitNameLen,
305 LLVMDWARFEmissionKind Kind, unsigned DWOId, LLVMBool SplitDebugInlining,
306 LLVMBool DebugInfoForProfiling, const char *SysRoot, size_t SysRootLen,
307 const char *SDK, size_t SDKLen);
308
309/**
310 * Create a file descriptor to hold debugging information for a file.
311 * \param Builder The \c DIBuilder.
312 * \param Filename File name.
313 * \param FilenameLen The length of the C string passed to \c Filename.
314 * \param Directory Directory.
315 * \param DirectoryLen The length of the C string passed to \c Directory.
316 */
318LLVMDIBuilderCreateFile(LLVMDIBuilderRef Builder, const char *Filename,
319 size_t FilenameLen, const char *Directory,
320 size_t DirectoryLen);
321
322/**
323 * Creates a new descriptor for a module with the specified parent scope.
324 * \param Builder The \c DIBuilder.
325 * \param ParentScope The parent scope containing this module declaration.
326 * \param Name Module name.
327 * \param NameLen The length of the C string passed to \c Name.
328 * \param ConfigMacros A space-separated shell-quoted list of -D macro
329 definitions as they would appear on a command line.
330 * \param ConfigMacrosLen The length of the C string passed to \c ConfigMacros.
331 * \param IncludePath The path to the module map file.
332 * \param IncludePathLen The length of the C string passed to \c IncludePath.
333 * \param APINotesFile The path to an API notes file for the module.
334 * \param APINotesFileLen The length of the C string passed to \c APINotestFile.
335 */
338 const char *Name, size_t NameLen,
339 const char *ConfigMacros, size_t ConfigMacrosLen,
340 const char *IncludePath, size_t IncludePathLen,
341 const char *APINotesFile, size_t APINotesFileLen);
342
343/**
344 * Creates a new descriptor for a namespace with the specified parent scope.
345 * \param Builder The \c DIBuilder.
346 * \param ParentScope The parent scope containing this module declaration.
347 * \param Name NameSpace name.
348 * \param NameLen The length of the C string passed to \c Name.
349 * \param ExportSymbols Whether or not the namespace exports symbols, e.g.
350 * this is true of C++ inline namespaces.
351 */
354 LLVMMetadataRef ParentScope,
355 const char *Name, size_t NameLen,
356 LLVMBool ExportSymbols);
357
358/**
359 * Create a new descriptor for the specified subprogram.
360 * \param Builder The \c DIBuilder.
361 * \param Scope Function scope.
362 * \param Name Function name.
363 * \param NameLen Length of enumeration name.
364 * \param LinkageName Mangled function name.
365 * \param LinkageNameLen Length of linkage name.
366 * \param File File where this variable is defined.
367 * \param LineNo Line number.
368 * \param Ty Function type.
369 * \param IsLocalToUnit True if this function is not externally visible.
370 * \param IsDefinition True if this is a function definition.
371 * \param ScopeLine Set to the beginning of the scope this starts
372 * \param Flags E.g.: \c LLVMDIFlagLValueReference. These flags are
373 * used to emit dwarf attributes.
374 * \param IsOptimized True if optimization is ON.
375 */
377 LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
378 size_t NameLen, const char *LinkageName, size_t LinkageNameLen,
379 LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Ty,
380 LLVMBool IsLocalToUnit, LLVMBool IsDefinition,
381 unsigned ScopeLine, LLVMDIFlags Flags, LLVMBool IsOptimized);
382
383/**
384 * Create a descriptor for a lexical block with the specified parent context.
385 * \param Builder The \c DIBuilder.
386 * \param Scope Parent lexical block.
387 * \param File Source file.
388 * \param Line The line in the source file.
389 * \param Column The column in the source file.
390 */
392 LLVMDIBuilderRef Builder, LLVMMetadataRef Scope,
393 LLVMMetadataRef File, unsigned Line, unsigned Column);
394
395/**
396 * Create a descriptor for a lexical block with a new file attached.
397 * \param Builder The \c DIBuilder.
398 * \param Scope Lexical block.
399 * \param File Source file.
400 * \param Discriminator DWARF path discriminator value.
401 */
404 LLVMMetadataRef Scope,
405 LLVMMetadataRef File,
406 unsigned Discriminator);
407
408/**
409 * Create a descriptor for an imported namespace. Suitable for e.g. C++
410 * using declarations.
411 * \param Builder The \c DIBuilder.
412 * \param Scope The scope this module is imported into
413 * \param File File where the declaration is located.
414 * \param Line Line number of the declaration.
415 */
418 LLVMMetadataRef Scope,
420 LLVMMetadataRef File,
421 unsigned Line);
422
423/**
424 * Create a descriptor for an imported module that aliases another
425 * imported entity descriptor.
426 * \param Builder The \c DIBuilder.
427 * \param Scope The scope this module is imported into
428 * \param ImportedEntity Previous imported entity to alias.
429 * \param File File where the declaration is located.
430 * \param Line Line number of the declaration.
431 * \param Elements Renamed elements.
432 * \param NumElements Number of renamed elements.
433 */
435 LLVMDIBuilderRef Builder, LLVMMetadataRef Scope,
436 LLVMMetadataRef ImportedEntity, LLVMMetadataRef File, unsigned Line,
437 LLVMMetadataRef *Elements, unsigned NumElements);
438
439/**
440 * Create a descriptor for an imported module.
441 * \param Builder The \c DIBuilder.
442 * \param Scope The scope this module is imported into
443 * \param M The module being imported here
444 * \param File File where the declaration is located.
445 * \param Line Line number of the declaration.
446 * \param Elements Renamed elements.
447 * \param NumElements Number of renamed elements.
448 */
451 LLVMMetadataRef File, unsigned Line, LLVMMetadataRef *Elements,
452 unsigned NumElements);
453
454/**
455 * Create a descriptor for an imported function, type, or variable. Suitable
456 * for e.g. FORTRAN-style USE declarations.
457 * \param Builder The DIBuilder.
458 * \param Scope The scope this module is imported into.
459 * \param Decl The declaration (or definition) of a function, type,
460 or variable.
461 * \param File File where the declaration is located.
462 * \param Line Line number of the declaration.
463 * \param Name A name that uniquely identifies this imported
464 declaration.
465 * \param NameLen The length of the C string passed to \c Name.
466 * \param Elements Renamed elements.
467 * \param NumElements Number of renamed elements.
468 */
471 LLVMMetadataRef File, unsigned Line, const char *Name, size_t NameLen,
472 LLVMMetadataRef *Elements, unsigned NumElements);
473
474/**
475 * Creates a new DebugLocation that describes a source location.
476 * \param Line The line in the source file.
477 * \param Column The column in the source file.
478 * \param Scope The scope in which the location resides.
479 * \param InlinedAt The scope where this location was inlined, if at all.
480 * (optional).
481 * \note If the item to which this location is attached cannot be
482 * attributed to a source line, pass 0 for the line and column.
483 */
486 unsigned Column, LLVMMetadataRef Scope,
487 LLVMMetadataRef InlinedAt);
488
489/**
490 * Get the line number of this debug location.
491 * \param Location The debug location.
492 *
493 * @see DILocation::getLine()
494 */
495unsigned LLVMDILocationGetLine(LLVMMetadataRef Location);
496
497/**
498 * Get the column number of this debug location.
499 * \param Location The debug location.
500 *
501 * @see DILocation::getColumn()
502 */
504
505/**
506 * Get the local scope associated with this debug location.
507 * \param Location The debug location.
508 *
509 * @see DILocation::getScope()
510 */
512
513/**
514 * Get the "inline at" location associated with this debug location.
515 * \param Location The debug location.
516 *
517 * @see DILocation::getInlinedAt()
518 */
520
521/**
522 * Get the metadata of the file associated with a given scope.
523 * \param Scope The scope object.
524 *
525 * @see DIScope::getFile()
526 */
528
529/**
530 * Get the directory of a given file.
531 * \param File The file object.
532 * \param Len The length of the returned string.
533 *
534 * @see DIFile::getDirectory()
535 */
536const char *LLVMDIFileGetDirectory(LLVMMetadataRef File, unsigned *Len);
537
538/**
539 * Get the name of a given file.
540 * \param File The file object.
541 * \param Len The length of the returned string.
542 *
543 * @see DIFile::getFilename()
544 */
545const char *LLVMDIFileGetFilename(LLVMMetadataRef File, unsigned *Len);
546
547/**
548 * Get the source of a given file.
549 * \param File The file object.
550 * \param Len The length of the returned string.
551 *
552 * @see DIFile::getSource()
553 */
554const char *LLVMDIFileGetSource(LLVMMetadataRef File, unsigned *Len);
555
556/**
557 * Create a type array.
558 * \param Builder The DIBuilder.
559 * \param Data The type elements.
560 * \param NumElements Number of type elements.
561 */
563 LLVMMetadataRef *Data,
564 size_t NumElements);
565
566/**
567 * Create subroutine type.
568 * \param Builder The DIBuilder.
569 * \param File The file in which the subroutine resides.
570 * \param ParameterTypes An array of subroutine parameter types. This
571 * includes return type at 0th index.
572 * \param NumParameterTypes The number of parameter types in \c ParameterTypes
573 * \param Flags E.g.: \c LLVMDIFlagLValueReference.
574 * These flags are used to emit dwarf attributes.
575 */
578 LLVMMetadataRef File,
579 LLVMMetadataRef *ParameterTypes,
580 unsigned NumParameterTypes,
581 LLVMDIFlags Flags);
582
583/**
584 * Create debugging information entry for a macro.
585 * @param Builder The DIBuilder.
586 * @param ParentMacroFile Macro parent (could be NULL).
587 * @param Line Source line number where the macro is defined.
588 * @param RecordType DW_MACINFO_define or DW_MACINFO_undef.
589 * @param Name Macro name.
590 * @param NameLen Macro name length.
591 * @param Value Macro value.
592 * @param ValueLen Macro value length.
593 */
595 LLVMMetadataRef ParentMacroFile,
596 unsigned Line,
598 const char *Name, size_t NameLen,
599 const char *Value, size_t ValueLen);
600
601/**
602 * Create debugging information temporary entry for a macro file.
603 * List of macro node direct children will be calculated by DIBuilder,
604 * using the \p ParentMacroFile relationship.
605 * @param Builder The DIBuilder.
606 * @param ParentMacroFile Macro parent (could be NULL).
607 * @param Line Source line number where the macro file is included.
608 * @param File File descriptor containing the name of the macro file.
609 */
612 LLVMMetadataRef ParentMacroFile, unsigned Line,
613 LLVMMetadataRef File);
614
615/**
616 * Create debugging information entry for an enumerator.
617 * @param Builder The DIBuilder.
618 * @param Name Enumerator name.
619 * @param NameLen Length of enumerator name.
620 * @param Value Enumerator value.
621 * @param IsUnsigned True if the value is unsigned.
622 */
624 const char *Name, size_t NameLen,
625 int64_t Value,
626 LLVMBool IsUnsigned);
627
628/**
629 * Create debugging information entry for an enumeration.
630 * \param Builder The DIBuilder.
631 * \param Scope Scope in which this enumeration is defined.
632 * \param Name Enumeration name.
633 * \param NameLen Length of enumeration name.
634 * \param File File where this member is defined.
635 * \param LineNumber Line number.
636 * \param SizeInBits Member size.
637 * \param AlignInBits Member alignment.
638 * \param Elements Enumeration elements.
639 * \param NumElements Number of enumeration elements.
640 * \param ClassTy Underlying type of a C++11/ObjC fixed enum.
641 */
643 LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
644 size_t NameLen, LLVMMetadataRef File, unsigned LineNumber,
645 uint64_t SizeInBits, uint32_t AlignInBits, LLVMMetadataRef *Elements,
646 unsigned NumElements, LLVMMetadataRef ClassTy);
647
648/**
649 * Create debugging information entry for a union.
650 * \param Builder The DIBuilder.
651 * \param Scope Scope in which this union is defined.
652 * \param Name Union name.
653 * \param NameLen Length of union name.
654 * \param File File where this member is defined.
655 * \param LineNumber Line number.
656 * \param SizeInBits Member size.
657 * \param AlignInBits Member alignment.
658 * \param Flags Flags to encode member attribute, e.g. private
659 * \param Elements Union elements.
660 * \param NumElements Number of union elements.
661 * \param RunTimeLang Optional parameter, Objective-C runtime version.
662 * \param UniqueId A unique identifier for the union.
663 * \param UniqueIdLen Length of unique identifier.
664 */
666 LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
667 size_t NameLen, LLVMMetadataRef File, unsigned LineNumber,
668 uint64_t SizeInBits, uint32_t AlignInBits, LLVMDIFlags Flags,
669 LLVMMetadataRef *Elements, unsigned NumElements, unsigned RunTimeLang,
670 const char *UniqueId, size_t UniqueIdLen);
671
672
673/**
674 * Create debugging information entry for an array.
675 * \param Builder The DIBuilder.
676 * \param Size Array size.
677 * \param AlignInBits Alignment.
678 * \param Ty Element type.
679 * \param Subscripts Subscripts.
680 * \param NumSubscripts Number of subscripts.
681 */
684 uint32_t AlignInBits, LLVMMetadataRef Ty,
685 LLVMMetadataRef *Subscripts,
686 unsigned NumSubscripts);
687
688/**
689 * Create debugging information entry for a vector type.
690 * \param Builder The DIBuilder.
691 * \param Size Vector size.
692 * \param AlignInBits Alignment.
693 * \param Ty Element type.
694 * \param Subscripts Subscripts.
695 * \param NumSubscripts Number of subscripts.
696 */
699 uint32_t AlignInBits, LLVMMetadataRef Ty,
700 LLVMMetadataRef *Subscripts,
701 unsigned NumSubscripts);
702
703/**
704 * Create a DWARF unspecified type.
705 * \param Builder The DIBuilder.
706 * \param Name The unspecified type's name.
707 * \param NameLen Length of type name.
708 */
711 size_t NameLen);
712
713/**
714 * Create debugging information entry for a basic
715 * type.
716 * \param Builder The DIBuilder.
717 * \param Name Type name.
718 * \param NameLen Length of type name.
719 * \param SizeInBits Size of the type.
720 * \param Encoding DWARF encoding code, e.g. \c LLVMDWARFTypeEncoding_float.
721 * \param Flags Flags to encode optional attribute like endianity
722 */
725 size_t NameLen, uint64_t SizeInBits,
726 LLVMDWARFTypeEncoding Encoding,
727 LLVMDIFlags Flags);
728
729/**
730 * Create debugging information entry for a pointer.
731 * \param Builder The DIBuilder.
732 * \param PointeeTy Type pointed by this pointer.
733 * \param SizeInBits Size.
734 * \param AlignInBits Alignment. (optional, pass 0 to ignore)
735 * \param AddressSpace DWARF address space. (optional, pass 0 to ignore)
736 * \param Name Pointer type name. (optional)
737 * \param NameLen Length of pointer type name. (optional)
738 */
740 LLVMDIBuilderRef Builder, LLVMMetadataRef PointeeTy,
741 uint64_t SizeInBits, uint32_t AlignInBits, unsigned AddressSpace,
742 const char *Name, size_t NameLen);
743
744/**
745 * Create debugging information entry for a struct.
746 * \param Builder The DIBuilder.
747 * \param Scope Scope in which this struct is defined.
748 * \param Name Struct name.
749 * \param NameLen Struct name length.
750 * \param File File where this member is defined.
751 * \param LineNumber Line number.
752 * \param SizeInBits Member size.
753 * \param AlignInBits Member alignment.
754 * \param Flags Flags to encode member attribute, e.g. private
755 * \param Elements Struct elements.
756 * \param NumElements Number of struct elements.
757 * \param RunTimeLang Optional parameter, Objective-C runtime version.
758 * \param VTableHolder The object containing the vtable for the struct.
759 * \param UniqueId A unique identifier for the struct.
760 * \param UniqueIdLen Length of the unique identifier for the struct.
761 */
763 LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
764 size_t NameLen, LLVMMetadataRef File, unsigned LineNumber,
765 uint64_t SizeInBits, uint32_t AlignInBits, LLVMDIFlags Flags,
766 LLVMMetadataRef DerivedFrom, LLVMMetadataRef *Elements,
767 unsigned NumElements, unsigned RunTimeLang, LLVMMetadataRef VTableHolder,
768 const char *UniqueId, size_t UniqueIdLen);
769
770/**
771 * Create debugging information entry for a member.
772 * \param Builder The DIBuilder.
773 * \param Scope Member scope.
774 * \param Name Member name.
775 * \param NameLen Length of member name.
776 * \param File File where this member is defined.
777 * \param LineNo Line number.
778 * \param SizeInBits Member size.
779 * \param AlignInBits Member alignment.
780 * \param OffsetInBits Member offset.
781 * \param Flags Flags to encode member attribute, e.g. private
782 * \param Ty Parent type.
783 */
785 LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
786 size_t NameLen, LLVMMetadataRef File, unsigned LineNo,
787 uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits,
788 LLVMDIFlags Flags, LLVMMetadataRef Ty);
789
790/**
791 * Create debugging information entry for a
792 * C++ static data member.
793 * \param Builder The DIBuilder.
794 * \param Scope Member scope.
795 * \param Name Member name.
796 * \param NameLen Length of member name.
797 * \param File File where this member is declared.
798 * \param LineNumber Line number.
799 * \param Type Type of the static member.
800 * \param Flags Flags to encode member attribute, e.g. private.
801 * \param ConstantVal Const initializer of the member.
802 * \param AlignInBits Member alignment.
803 */
806 LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
807 size_t NameLen, LLVMMetadataRef File, unsigned LineNumber,
808 LLVMMetadataRef Type, LLVMDIFlags Flags, LLVMValueRef ConstantVal,
809 uint32_t AlignInBits);
810
811/**
812 * Create debugging information entry for a pointer to member.
813 * \param Builder The DIBuilder.
814 * \param PointeeType Type pointed to by this pointer.
815 * \param ClassType Type for which this pointer points to members of.
816 * \param SizeInBits Size.
817 * \param AlignInBits Alignment.
818 * \param Flags Flags.
819 */
822 LLVMMetadataRef PointeeType,
823 LLVMMetadataRef ClassType,
824 uint64_t SizeInBits,
825 uint32_t AlignInBits,
826 LLVMDIFlags Flags);
827/**
828 * Create debugging information entry for Objective-C instance variable.
829 * \param Builder The DIBuilder.
830 * \param Name Member name.
831 * \param NameLen The length of the C string passed to \c Name.
832 * \param File File where this member is defined.
833 * \param LineNo Line number.
834 * \param SizeInBits Member size.
835 * \param AlignInBits Member alignment.
836 * \param OffsetInBits Member offset.
837 * \param Flags Flags to encode member attribute, e.g. private
838 * \param Ty Parent type.
839 * \param PropertyNode Property associated with this ivar.
840 */
843 const char *Name, size_t NameLen,
844 LLVMMetadataRef File, unsigned LineNo,
845 uint64_t SizeInBits, uint32_t AlignInBits,
846 uint64_t OffsetInBits, LLVMDIFlags Flags,
847 LLVMMetadataRef Ty, LLVMMetadataRef PropertyNode);
848
849/**
850 * Create debugging information entry for Objective-C property.
851 * \param Builder The DIBuilder.
852 * \param Name Property name.
853 * \param NameLen The length of the C string passed to \c Name.
854 * \param File File where this property is defined.
855 * \param LineNo Line number.
856 * \param GetterName Name of the Objective C property getter selector.
857 * \param GetterNameLen The length of the C string passed to \c GetterName.
858 * \param SetterName Name of the Objective C property setter selector.
859 * \param SetterNameLen The length of the C string passed to \c SetterName.
860 * \param PropertyAttributes Objective C property attributes.
861 * \param Ty Type.
862 */
865 const char *Name, size_t NameLen,
866 LLVMMetadataRef File, unsigned LineNo,
867 const char *GetterName, size_t GetterNameLen,
868 const char *SetterName, size_t SetterNameLen,
869 unsigned PropertyAttributes,
870 LLVMMetadataRef Ty);
871
872/**
873 * Create a uniqued DIType* clone with FlagObjectPointer. If \c Implicit
874 * is true, then also set FlagArtificial.
875 * \param Builder The DIBuilder.
876 * \param Type The underlying type to which this pointer points.
877 * \param Implicit Indicates whether this pointer was implicitly generated
878 * (i.e., not spelled out in source).
879 */
882 LLVMBool Implicit);
883
884/**
885 * Create debugging information entry for a qualified
886 * type, e.g. 'const int'.
887 * \param Builder The DIBuilder.
888 * \param Tag Tag identifying type,
889 * e.g. LLVMDWARFTypeQualifier_volatile_type
890 * \param Type Base Type.
891 */
895
896/**
897 * Create debugging information entry for a c++
898 * style reference or rvalue reference type.
899 * \param Builder The DIBuilder.
900 * \param Tag Tag identifying type,
901 * \param Type Base Type.
902 */
906
907/**
908 * Create C++11 nullptr type.
909 * \param Builder The DIBuilder.
910 */
913
914/**
915 * Create debugging information entry for a typedef.
916 * \param Builder The DIBuilder.
917 * \param Type Original type.
918 * \param Name Typedef name.
919 * \param File File where this type is defined.
920 * \param LineNo Line number.
921 * \param Scope The surrounding context for the typedef.
922 */
925 const char *Name, size_t NameLen,
926 LLVMMetadataRef File, unsigned LineNo,
927 LLVMMetadataRef Scope, uint32_t AlignInBits);
928
929/**
930 * Create debugging information entry to establish inheritance relationship
931 * between two types.
932 * \param Builder The DIBuilder.
933 * \param Ty Original type.
934 * \param BaseTy Base type. Ty is inherits from base.
935 * \param BaseOffset Base offset.
936 * \param VBPtrOffset Virtual base pointer offset.
937 * \param Flags Flags to describe inheritance attribute, e.g. private
938 */
942 uint64_t BaseOffset, uint32_t VBPtrOffset,
943 LLVMDIFlags Flags);
944
945/**
946 * Create a permanent forward-declared type.
947 * \param Builder The DIBuilder.
948 * \param Tag A unique tag for this type.
949 * \param Name Type name.
950 * \param NameLen Length of type name.
951 * \param Scope Type scope.
952 * \param File File where this type is defined.
953 * \param Line Line number where this type is defined.
954 * \param RuntimeLang Indicates runtime version for languages like
955 * Objective-C.
956 * \param SizeInBits Member size.
957 * \param AlignInBits Member alignment.
958 * \param UniqueIdentifier A unique identifier for the type.
959 * \param UniqueIdentifierLen Length of the unique identifier.
960 */
962 LLVMDIBuilderRef Builder, unsigned Tag, const char *Name,
963 size_t NameLen, LLVMMetadataRef Scope, LLVMMetadataRef File, unsigned Line,
964 unsigned RuntimeLang, uint64_t SizeInBits, uint32_t AlignInBits,
965 const char *UniqueIdentifier, size_t UniqueIdentifierLen);
966
967/**
968 * Create a temporary forward-declared type.
969 * \param Builder The DIBuilder.
970 * \param Tag A unique tag for this type.
971 * \param Name Type name.
972 * \param NameLen Length of type name.
973 * \param Scope Type scope.
974 * \param File File where this type is defined.
975 * \param Line Line number where this type is defined.
976 * \param RuntimeLang Indicates runtime version for languages like
977 * Objective-C.
978 * \param SizeInBits Member size.
979 * \param AlignInBits Member alignment.
980 * \param Flags Flags.
981 * \param UniqueIdentifier A unique identifier for the type.
982 * \param UniqueIdentifierLen Length of the unique identifier.
983 */
986 LLVMDIBuilderRef Builder, unsigned Tag, const char *Name,
987 size_t NameLen, LLVMMetadataRef Scope, LLVMMetadataRef File, unsigned Line,
988 unsigned RuntimeLang, uint64_t SizeInBits, uint32_t AlignInBits,
989 LLVMDIFlags Flags, const char *UniqueIdentifier,
990 size_t UniqueIdentifierLen);
991
992/**
993 * Create debugging information entry for a bit field member.
994 * \param Builder The DIBuilder.
995 * \param Scope Member scope.
996 * \param Name Member name.
997 * \param NameLen Length of member name.
998 * \param File File where this member is defined.
999 * \param LineNumber Line number.
1000 * \param SizeInBits Member size.
1001 * \param OffsetInBits Member offset.
1002 * \param StorageOffsetInBits Member storage offset.
1003 * \param Flags Flags to encode member attribute.
1004 * \param Type Parent type.
1005 */
1008 LLVMMetadataRef Scope,
1009 const char *Name, size_t NameLen,
1010 LLVMMetadataRef File, unsigned LineNumber,
1011 uint64_t SizeInBits,
1012 uint64_t OffsetInBits,
1013 uint64_t StorageOffsetInBits,
1015
1016/**
1017 * Create debugging information entry for a class.
1018 * \param Scope Scope in which this class is defined.
1019 * \param Name Class name.
1020 * \param NameLen The length of the C string passed to \c Name.
1021 * \param File File where this member is defined.
1022 * \param LineNumber Line number.
1023 * \param SizeInBits Member size.
1024 * \param AlignInBits Member alignment.
1025 * \param OffsetInBits Member offset.
1026 * \param Flags Flags to encode member attribute, e.g. private.
1027 * \param DerivedFrom Debug info of the base class of this type.
1028 * \param Elements Class members.
1029 * \param NumElements Number of class elements.
1030 * \param VTableHolder Debug info of the base class that contains vtable
1031 * for this type. This is used in
1032 * DW_AT_containing_type. See DWARF documentation
1033 * for more info.
1034 * \param TemplateParamsNode Template type parameters.
1035 * \param UniqueIdentifier A unique identifier for the type.
1036 * \param UniqueIdentifierLen Length of the unique identifier.
1037 */
1039 LLVMMetadataRef Scope, const char *Name, size_t NameLen,
1040 LLVMMetadataRef File, unsigned LineNumber, uint64_t SizeInBits,
1041 uint32_t AlignInBits, uint64_t OffsetInBits, LLVMDIFlags Flags,
1042 LLVMMetadataRef DerivedFrom,
1043 LLVMMetadataRef *Elements, unsigned NumElements,
1044 LLVMMetadataRef VTableHolder, LLVMMetadataRef TemplateParamsNode,
1045 const char *UniqueIdentifier, size_t UniqueIdentifierLen);
1046
1047/**
1048 * Create a uniqued DIType* clone with FlagArtificial set.
1049 * \param Builder The DIBuilder.
1050 * \param Type The underlying type.
1051 */
1055
1056/**
1057 * Get the name of this DIType.
1058 * \param DType The DIType.
1059 * \param Length The length of the returned string.
1060 *
1061 * @see DIType::getName()
1062 */
1063const char *LLVMDITypeGetName(LLVMMetadataRef DType, size_t *Length);
1064
1065/**
1066 * Get the size of this DIType in bits.
1067 * \param DType The DIType.
1068 *
1069 * @see DIType::getSizeInBits()
1070 */
1072
1073/**
1074 * Get the offset of this DIType in bits.
1075 * \param DType The DIType.
1076 *
1077 * @see DIType::getOffsetInBits()
1078 */
1080
1081/**
1082 * Get the alignment of this DIType in bits.
1083 * \param DType The DIType.
1084 *
1085 * @see DIType::getAlignInBits()
1086 */
1088
1089/**
1090 * Get the source line where this DIType is declared.
1091 * \param DType The DIType.
1092 *
1093 * @see DIType::getLine()
1094 */
1095unsigned LLVMDITypeGetLine(LLVMMetadataRef DType);
1096
1097/**
1098 * Get the flags associated with this DIType.
1099 * \param DType The DIType.
1100 *
1101 * @see DIType::getFlags()
1102 */
1104
1105/**
1106 * Create a descriptor for a value range.
1107 * \param Builder The DIBuilder.
1108 * \param LowerBound Lower bound of the subrange, e.g. 0 for C, 1 for Fortran.
1109 * \param Count Count of elements in the subrange.
1110 */
1112 int64_t LowerBound,
1113 int64_t Count);
1114
1115/**
1116 * Create an array of DI Nodes.
1117 * \param Builder The DIBuilder.
1118 * \param Data The DI Node elements.
1119 * \param NumElements Number of DI Node elements.
1120 */
1122 LLVMMetadataRef *Data,
1123 size_t NumElements);
1124
1125/**
1126 * Create a new descriptor for the specified variable which has a complex
1127 * address expression for its address.
1128 * \param Builder The DIBuilder.
1129 * \param Addr An array of complex address operations.
1130 * \param Length Length of the address operation array.
1131 */
1133 uint64_t *Addr, size_t Length);
1134
1135/**
1136 * Create a new descriptor for the specified variable that does not have an
1137 * address, but does have a constant value.
1138 * \param Builder The DIBuilder.
1139 * \param Value The constant value.
1140 */
1143 uint64_t Value);
1144
1145/**
1146 * Create a new descriptor for the specified variable.
1147 * \param Scope Variable scope.
1148 * \param Name Name of the variable.
1149 * \param NameLen The length of the C string passed to \c Name.
1150 * \param Linkage Mangled name of the variable.
1151 * \param LinkLen The length of the C string passed to \c Linkage.
1152 * \param File File where this variable is defined.
1153 * \param LineNo Line number.
1154 * \param Ty Variable Type.
1155 * \param LocalToUnit Boolean flag indicate whether this variable is
1156 * externally visible or not.
1157 * \param Expr The location of the global relative to the attached
1158 * GlobalVariable.
1159 * \param Decl Reference to the corresponding declaration.
1160 * variables.
1161 * \param AlignInBits Variable alignment(or 0 if no alignment attr was
1162 * specified)
1163 */
1165 LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
1166 size_t NameLen, const char *Linkage, size_t LinkLen, LLVMMetadataRef File,
1167 unsigned LineNo, LLVMMetadataRef Ty, LLVMBool LocalToUnit,
1168 LLVMMetadataRef Expr, LLVMMetadataRef Decl, uint32_t AlignInBits);
1169
1170
1171/**
1172 * Get the dwarf::Tag of a DINode
1173 */
1175
1176/**
1177 * Retrieves the \c DIVariable associated with this global variable expression.
1178 * \param GVE The global variable expression.
1179 *
1180 * @see llvm::DIGlobalVariableExpression::getVariable()
1181 */
1183
1184/**
1185 * Retrieves the \c DIExpression associated with this global variable expression.
1186 * \param GVE The global variable expression.
1187 *
1188 * @see llvm::DIGlobalVariableExpression::getExpression()
1189 */
1191 LLVMMetadataRef GVE);
1192
1193/**
1194 * Get the metadata of the file associated with a given variable.
1195 * \param Var The variable object.
1196 *
1197 * @see DIVariable::getFile()
1198 */
1200
1201/**
1202 * Get the metadata of the scope associated with a given variable.
1203 * \param Var The variable object.
1204 *
1205 * @see DIVariable::getScope()
1206 */
1208
1209/**
1210 * Get the source line where this \c DIVariable is declared.
1211 * \param Var The DIVariable.
1212 *
1213 * @see DIVariable::getLine()
1214 */
1216
1217/**
1218 * Create a new temporary \c MDNode. Suitable for use in constructing cyclic
1219 * \c MDNode structures. A temporary \c MDNode is not uniqued, may be RAUW'd,
1220 * and must be manually deleted with \c LLVMDisposeTemporaryMDNode.
1221 * \param Ctx The context in which to construct the temporary node.
1222 * \param Data The metadata elements.
1223 * \param NumElements Number of metadata elements.
1224 */
1226 size_t NumElements);
1227
1228/**
1229 * Deallocate a temporary node.
1230 *
1231 * Calls \c replaceAllUsesWith(nullptr) before deleting, so any remaining
1232 * references will be reset.
1233 * \param TempNode The temporary metadata node.
1234 */
1236
1237/**
1238 * Replace all uses of temporary metadata.
1239 * \param TempTargetMetadata The temporary metadata node.
1240 * \param Replacement The replacement metadata node.
1241 */
1242void LLVMMetadataReplaceAllUsesWith(LLVMMetadataRef TempTargetMetadata,
1243 LLVMMetadataRef Replacement);
1244
1245/**
1246 * Create a new descriptor for the specified global variable that is temporary
1247 * and meant to be RAUWed.
1248 * \param Scope Variable scope.
1249 * \param Name Name of the variable.
1250 * \param NameLen The length of the C string passed to \c Name.
1251 * \param Linkage Mangled name of the variable.
1252 * \param LnkLen The length of the C string passed to \c Linkage.
1253 * \param File File where this variable is defined.
1254 * \param LineNo Line number.
1255 * \param Ty Variable Type.
1256 * \param LocalToUnit Boolean flag indicate whether this variable is
1257 * externally visible or not.
1258 * \param Decl Reference to the corresponding declaration.
1259 * \param AlignInBits Variable alignment(or 0 if no alignment attr was
1260 * specified)
1261 */
1263 LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
1264 size_t NameLen, const char *Linkage, size_t LnkLen, LLVMMetadataRef File,
1265 unsigned LineNo, LLVMMetadataRef Ty, LLVMBool LocalToUnit,
1266 LLVMMetadataRef Decl, uint32_t AlignInBits);
1267
1268/**
1269 * Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).
1270 * See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
1271 *
1272 * The debug format can be switched later after inserting the records using
1273 * LLVMSetIsNewDbgInfoFormat, if needed for legacy or transitionary reasons.
1274 *
1275 * Insert a Declare DbgRecord before the given instruction.
1276 * \param Builder The DIBuilder.
1277 * \param Storage The storage of the variable to declare.
1278 * \param VarInfo The variable's debug info descriptor.
1279 * \param Expr A complex location expression for the variable.
1280 * \param DebugLoc Debug info location.
1281 * \param Instr Instruction acting as a location for the new record.
1282 */
1284 LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo,
1285 LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
1286
1287/**
1288 * Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).
1289 * See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
1290 *
1291 * The debug format can be switched later after inserting the records using
1292 * LLVMSetIsNewDbgInfoFormat, if needed for legacy or transitionary reasons.
1293 *
1294 * Insert a Declare DbgRecord at the end of the given basic block. If the basic
1295 * block has a terminator instruction, the record is inserted before that
1296 * terminator instruction.
1297 * \param Builder The DIBuilder.
1298 * \param Storage The storage of the variable to declare.
1299 * \param VarInfo The variable's debug info descriptor.
1300 * \param Expr A complex location expression for the variable.
1301 * \param DebugLoc Debug info location.
1302 * \param Block Basic block acting as a location for the new record.
1303 */
1305 LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo,
1306 LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block);
1307
1308/**
1309 * Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).
1310 * See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
1311 *
1312 * The debug format can be switched later after inserting the records using
1313 * LLVMSetIsNewDbgInfoFormat, if needed for legacy or transitionary reasons.
1314 *
1315 * Insert a new debug record before the given instruction.
1316 * \param Builder The DIBuilder.
1317 * \param Val The value of the variable.
1318 * \param VarInfo The variable's debug info descriptor.
1319 * \param Expr A complex location expression for the variable.
1320 * \param DebugLoc Debug info location.
1321 * \param Instr Instruction acting as a location for the new record.
1322 */
1324 LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo,
1325 LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
1326
1327/**
1328 * Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).
1329 * See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
1330 *
1331 * The debug format can be switched later after inserting the records using
1332 * LLVMSetIsNewDbgInfoFormat, if needed for legacy or transitionary reasons.
1333 *
1334 * Insert a new debug record at the end of the given basic block. If the
1335 * basic block has a terminator instruction, the record is inserted before
1336 * that terminator instruction.
1337 * \param Builder The DIBuilder.
1338 * \param Val The value of the variable.
1339 * \param VarInfo The variable's debug info descriptor.
1340 * \param Expr A complex location expression for the variable.
1341 * \param DebugLoc Debug info location.
1342 * \param Block Basic block acting as a location for the new record.
1343 */
1345 LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo,
1346 LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block);
1347
1348/**
1349 * Create a new descriptor for a local auto variable.
1350 * \param Builder The DIBuilder.
1351 * \param Scope The local scope the variable is declared in.
1352 * \param Name Variable name.
1353 * \param NameLen Length of variable name.
1354 * \param File File where this variable is defined.
1355 * \param LineNo Line number.
1356 * \param Ty Metadata describing the type of the variable.
1357 * \param AlwaysPreserve If true, this descriptor will survive optimizations.
1358 * \param Flags Flags.
1359 * \param AlignInBits Variable alignment.
1360 */
1362 LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
1363 size_t NameLen, LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Ty,
1364 LLVMBool AlwaysPreserve, LLVMDIFlags Flags, uint32_t AlignInBits);
1365
1366/**
1367 * Create a new descriptor for a function parameter variable.
1368 * \param Builder The DIBuilder.
1369 * \param Scope The local scope the variable is declared in.
1370 * \param Name Variable name.
1371 * \param NameLen Length of variable name.
1372 * \param ArgNo Unique argument number for this variable; starts at 1.
1373 * \param File File where this variable is defined.
1374 * \param LineNo Line number.
1375 * \param Ty Metadata describing the type of the variable.
1376 * \param AlwaysPreserve If true, this descriptor will survive optimizations.
1377 * \param Flags Flags.
1378 */
1380 LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
1381 size_t NameLen, unsigned ArgNo, LLVMMetadataRef File, unsigned LineNo,
1382 LLVMMetadataRef Ty, LLVMBool AlwaysPreserve, LLVMDIFlags Flags);
1383
1384/**
1385 * Get the metadata of the subprogram attached to a function.
1386 *
1387 * @see llvm::Function::getSubprogram()
1388 */
1390
1391/**
1392 * Set the subprogram attached to a function.
1393 *
1394 * @see llvm::Function::setSubprogram()
1395 */
1397
1398/**
1399 * Get the line associated with a given subprogram.
1400 * \param Subprogram The subprogram object.
1401 *
1402 * @see DISubprogram::getLine()
1403 */
1404unsigned LLVMDISubprogramGetLine(LLVMMetadataRef Subprogram);
1405
1406/**
1407 * Get the debug location for the given instruction.
1408 *
1409 * @see llvm::Instruction::getDebugLoc()
1410 */
1412
1413/**
1414 * Set the debug location for the given instruction.
1415 *
1416 * To clear the location metadata of the given instruction, pass NULL to \p Loc.
1417 *
1418 * @see llvm::Instruction::setDebugLoc()
1419 */
1421
1422/**
1423 * Create a new descriptor for a label
1424 *
1425 * \param Builder The DIBuilder.
1426 * \param Scope The scope to create the label in.
1427 * \param Name Variable name.
1428 * \param NameLen Length of variable name.
1429 * \param File The file to create the label in.
1430 * \param LineNo Line Number.
1431 * \param AlwaysPreserve Preserve the label regardless of optimization.
1432 *
1433 * @see llvm::DIBuilder::createLabel()
1434 */
1436 LLVMDIBuilderRef Builder,
1437 LLVMMetadataRef Context, const char *Name, size_t NameLen,
1438 LLVMMetadataRef File, unsigned LineNo, LLVMBool AlwaysPreserve);
1439
1440/**
1441 * Insert a new llvm.dbg.label intrinsic call
1442 *
1443 * \param Builder The DIBuilder.
1444 * \param LabelInfo The Label's debug info descriptor
1445 * \param Location The debug info location
1446 * \param InsertBefore Location for the new intrinsic.
1447 *
1448 * @see llvm::DIBuilder::insertLabel()
1449 */
1451 LLVMDIBuilderRef Builder, LLVMMetadataRef LabelInfo,
1452 LLVMMetadataRef Location, LLVMValueRef InsertBefore);
1453
1454/**
1455 * Insert a new llvm.dbg.label intrinsic call
1456 *
1457 * \param Builder The DIBuilder.
1458 * \param LabelInfo The Label's debug info descriptor
1459 * \param Location The debug info location
1460 * \param InsertAtEnd Location for the new intrinsic.
1461 *
1462 * @see llvm::DIBuilder::insertLabel()
1463 */
1465 LLVMDIBuilderRef Builder, LLVMMetadataRef LabelInfo,
1466 LLVMMetadataRef Location, LLVMBasicBlockRef InsertAtEnd);
1467
1468/**
1469 * Obtain the enumerated type of a Metadata instance.
1470 *
1471 * @see llvm::Metadata::getMetadataID()
1472 */
1474
1475/**
1476 * @}
1477 */
1478
1480
1481#endif
RelocType Type
Definition: COFFYAML.cpp:410
DXIL Finalize Linkage
dxil translate DXIL Translate Metadata
uint64_t Addr
std::string Name
uint64_t Size
#define LLVM_C_EXTERN_C_BEGIN
Definition: ExternC.h:35
#define LLVM_C_EXTERN_C_END
Definition: ExternC.h:36
Machine Check Debug Module
LLVMMetadataRef LLVMDIBuilderCreateObjCIVar(LLVMDIBuilderRef Builder, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNo, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, LLVMDIFlags Flags, LLVMMetadataRef Ty, LLVMMetadataRef PropertyNode)
Create debugging information entry for Objective-C instance variable.
Definition: DebugInfo.cpp:1408
LLVMMetadataRef LLVMDILocationGetInlinedAt(LLVMMetadataRef Location)
Get the "inline at" location associated with this debug location.
Definition: DebugInfo.cpp:1239
LLVMMetadataRef LLVMDIBuilderGetOrCreateArray(LLVMDIBuilderRef Builder, LLVMMetadataRef *Data, size_t NumElements)
Create an array of DI Nodes.
Definition: DebugInfo.cpp:1773
LLVMMetadataRef LLVMDIBuilderCreateEnumerationType(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, LLVMMetadataRef *Elements, unsigned NumElements, LLVMMetadataRef ClassTy)
Create debugging information entry for an enumeration.
Definition: DebugInfo.cpp:1296
LLVMMetadataRef LLVMDIBuilderCreateImportedModuleFromModule(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef M, LLVMMetadataRef File, unsigned Line, LLVMMetadataRef *Elements, unsigned NumElements)
Create a descriptor for an imported module.
Definition: DebugInfo.cpp:1193
uint64_t LLVMDITypeGetSizeInBits(LLVMMetadataRef DType)
Get the size of this DIType in bits.
Definition: DebugInfo.cpp:1571
LLVMDWARFMacinfoRecordType
Describes the kind of macro declaration used for LLVMDIBuilderCreateMacro.
Definition: DebugInfo.h:211
LLVMMetadataRef LLVMDIBuilderCreateFunction(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, const char *LinkageName, size_t LinkageNameLen, LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Ty, LLVMBool IsLocalToUnit, LLVMBool IsDefinition, unsigned ScopeLine, LLVMDIFlags Flags, LLVMBool IsOptimized)
Create a new descriptor for the specified subprogram.
Definition: DebugInfo.cpp:1135
LLVMDbgRecordRef LLVMDIBuilderInsertDeclareRecordAtEnd(LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo, LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block)
Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).
Definition: DebugInfo.cpp:1700
LLVMMetadataRef LLVMDIBuilderCreateBitFieldMemberType(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, uint64_t SizeInBits, uint64_t OffsetInBits, uint64_t StorageOffsetInBits, LLVMDIFlags Flags, LLVMMetadataRef Type)
Create debugging information entry for a bit field member.
Definition: DebugInfo.cpp:1521
LLVMMetadataRef LLVMDIGlobalVariableExpressionGetVariable(LLVMMetadataRef GVE)
Retrieves the DIVariable associated with this global variable expression.
Definition: DebugInfo.cpp:1634
LLVMMetadataRef LLVMDIBuilderCreateArtificialType(LLVMDIBuilderRef Builder, LLVMMetadataRef Type)
Create a uniqued DIType* clone with FlagArtificial set.
Definition: DebugInfo.cpp:1556
LLVMMetadataRef LLVMDIBuilderCreateObjectPointerType(LLVMDIBuilderRef Builder, LLVMMetadataRef Type, LLVMBool Implicit)
Create a uniqued DIType* clone with FlagObjectPointer.
Definition: DebugInfo.cpp:1435
void LLVMDIBuilderFinalize(LLVMDIBuilderRef Builder)
Construct any deferred debug info descriptors.
Definition: DebugInfo.cpp:1077
LLVMMetadataRef LLVMDIBuilderCreateLexicalBlockFile(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef File, unsigned Discriminator)
Create a descriptor for a lexical block with a new file attached.
Definition: DebugInfo.cpp:1159
unsigned LLVMDISubprogramGetLine(LLVMMetadataRef Subprogram)
Get the line associated with a given subprogram.
Definition: DebugInfo.cpp:1788
LLVMMetadataRef LLVMDIBuilderCreateUnspecifiedType(LLVMDIBuilderRef Builder, const char *Name, size_t NameLen)
Create a DWARF unspecified type.
Definition: DebugInfo.cpp:1391
LLVMMetadataRef LLVMDIBuilderCreateNameSpace(LLVMDIBuilderRef Builder, LLVMMetadataRef ParentScope, const char *Name, size_t NameLen, LLVMBool ExportSymbols)
Creates a new descriptor for a namespace with the specified parent scope.
Definition: DebugInfo.cpp:1127
LLVMMetadataRef LLVMDIBuilderCreateDebugLocation(LLVMContextRef Ctx, unsigned Line, unsigned Column, LLVMMetadataRef Scope, LLVMMetadataRef InlinedAt)
Creates a new DebugLocation that describes a source location.
Definition: DebugInfo.cpp:1220
uint32_t LLVMDITypeGetAlignInBits(LLVMMetadataRef DType)
Get the alignment of this DIType in bits.
Definition: DebugInfo.cpp:1579
LLVMMetadataRef LLVMDIGlobalVariableExpressionGetExpression(LLVMMetadataRef GVE)
Retrieves the DIExpression associated with this global variable expression.
Definition: DebugInfo.cpp:1638
LLVMMetadataRef LLVMDIVariableGetScope(LLVMMetadataRef Var)
Get the metadata of the scope associated with a given variable.
Definition: DebugInfo.cpp:1647
LLVMMetadataRef LLVMInstructionGetDebugLoc(LLVMValueRef Inst)
Get the debug location for the given instruction.
Definition: DebugInfo.cpp:1792
LLVMMetadataRef LLVMDIBuilderCreateReferenceType(LLVMDIBuilderRef Builder, unsigned Tag, LLVMMetadataRef Type)
Create debugging information entry for a c++ style reference or rvalue reference type.
Definition: DebugInfo.cpp:1496
LLVMMetadataRef LLVMDIBuilderCreateModule(LLVMDIBuilderRef Builder, LLVMMetadataRef ParentScope, const char *Name, size_t NameLen, const char *ConfigMacros, size_t ConfigMacrosLen, const char *IncludePath, size_t IncludePathLen, const char *APINotesFile, size_t APINotesFileLen)
Creates a new descriptor for a module with the specified parent scope.
Definition: DebugInfo.cpp:1115
LLVMDIBuilderRef LLVMCreateDIBuilderDisallowUnresolved(LLVMModuleRef M)
Construct a builder for a module, and do not allow for unresolved nodes attached to the module.
Definition: DebugInfo.cpp:1057
void LLVMSetSubprogram(LLVMValueRef Func, LLVMMetadataRef SP)
Set the subprogram attached to a function.
Definition: DebugInfo.cpp:1784
LLVMDWARFSourceLanguage
Source languages known by DWARF.
Definition: DebugInfo.h:78
LLVMMetadataRef LLVMDIBuilderGetOrCreateSubrange(LLVMDIBuilderRef Builder, int64_t LowerBound, int64_t Count)
Create a descriptor for a value range.
Definition: DebugInfo.cpp:1768
LLVMDIBuilderRef LLVMCreateDIBuilder(LLVMModuleRef M)
Construct a builder for a module and collect unresolved nodes attached to the module in order to reso...
Definition: DebugInfo.cpp:1061
void LLVMDisposeTemporaryMDNode(LLVMMetadataRef TempNode)
Deallocate a temporary node.
Definition: DebugInfo.cpp:1661
LLVMMetadataRef LLVMDILocationGetScope(LLVMMetadataRef Location)
Get the local scope associated with this debug location.
Definition: DebugInfo.cpp:1235
LLVMMetadataRef LLVMDIBuilderCreateImportedModuleFromNamespace(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef NS, LLVMMetadataRef File, unsigned Line)
Create a descriptor for an imported namespace.
Definition: DebugInfo.cpp:1169
LLVMMetadataRef LLVMDIBuilderCreateTempMacroFile(LLVMDIBuilderRef Builder, LLVMMetadataRef ParentMacroFile, unsigned Line, LLVMMetadataRef File)
Create debugging information temporary entry for a macro file.
Definition: DebugInfo.cpp:1281
void LLVMInstructionSetDebugLoc(LLVMValueRef Inst, LLVMMetadataRef Loc)
Set the debug location for the given instruction.
Definition: DebugInfo.cpp:1796
LLVMMetadataRef LLVMDIBuilderCreateEnumerator(LLVMDIBuilderRef Builder, const char *Name, size_t NameLen, int64_t Value, LLVMBool IsUnsigned)
Create debugging information entry for an enumerator.
Definition: DebugInfo.cpp:1288
LLVMMetadataRef LLVMDIBuilderCreateExpression(LLVMDIBuilderRef Builder, uint64_t *Addr, size_t Length)
Create a new descriptor for the specified variable which has a complex address expression for its add...
Definition: DebugInfo.cpp:1610
LLVMMetadataRef LLVMDIBuilderCreateVectorType(LLVMDIBuilderRef Builder, uint64_t Size, uint32_t AlignInBits, LLVMMetadataRef Ty, LLVMMetadataRef *Subscripts, unsigned NumSubscripts)
Create debugging information entry for a vector type.
Definition: DebugInfo.cpp:1335
LLVMMetadataRef LLVMDIBuilderCreateMemberPointerType(LLVMDIBuilderRef Builder, LLVMMetadataRef PointeeType, LLVMMetadataRef ClassType, uint64_t SizeInBits, uint32_t AlignInBits, LLVMDIFlags Flags)
Create debugging information entry for a pointer to member.
Definition: DebugInfo.cpp:1508
unsigned LLVMDILocationGetColumn(LLVMMetadataRef Location)
Get the column number of this debug location.
Definition: DebugInfo.cpp:1231
LLVMDIFlags
Debug info flags.
Definition: DebugInfo.h:34
LLVMMetadataRef LLVMDIBuilderCreateAutoVariable(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Ty, LLVMBool AlwaysPreserve, LLVMDIFlags Flags, uint32_t AlignInBits)
Create a new descriptor for a local auto variable.
Definition: DebugInfo.cpp:1748
LLVMMetadataRef LLVMTemporaryMDNode(LLVMContextRef Ctx, LLVMMetadataRef *Data, size_t NumElements)
Create a new temporary MDNode.
Definition: DebugInfo.cpp:1655
LLVMDIFlags LLVMDITypeGetFlags(LLVMMetadataRef DType)
Get the flags associated with this DIType.
Definition: DebugInfo.cpp:1587
const char * LLVMDIFileGetDirectory(LLVMMetadataRef File, unsigned *Len)
Get the directory of a given file.
Definition: DebugInfo.cpp:1247
void LLVMMetadataReplaceAllUsesWith(LLVMMetadataRef TempTargetMetadata, LLVMMetadataRef Replacement)
Replace all uses of temporary metadata.
Definition: DebugInfo.cpp:1665
const char * LLVMDIFileGetFilename(LLVMMetadataRef File, unsigned *Len)
Get the name of a given file.
Definition: DebugInfo.cpp:1253
LLVMMetadataRef LLVMDIBuilderCreateLabel(LLVMDIBuilderRef Builder, LLVMMetadataRef Context, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNo, LLVMBool AlwaysPreserve)
Create a new descriptor for a label.
Definition: DebugInfo.cpp:1803
unsigned LLVMDebugMetadataVersion(void)
The current debug metadata version number.
Definition: DebugInfo.cpp:1053
unsigned LLVMGetModuleDebugMetadataVersion(LLVMModuleRef Module)
The version of debug metadata that's present in the provided Module.
Definition: DebugInfo.cpp:1065
unsigned LLVMDITypeGetLine(LLVMMetadataRef DType)
Get the source line where this DIType is declared.
Definition: DebugInfo.cpp:1583
LLVMMetadataRef LLVMDIVariableGetFile(LLVMMetadataRef Var)
Get the metadata of the file associated with a given variable.
Definition: DebugInfo.cpp:1643
LLVMMetadataRef LLVMDIBuilderCreateImportedModuleFromAlias(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef ImportedEntity, LLVMMetadataRef File, unsigned Line, LLVMMetadataRef *Elements, unsigned NumElements)
Create a descriptor for an imported module that aliases another imported entity descriptor.
Definition: DebugInfo.cpp:1180
LLVMMetadataRef LLVMDIBuilderCreateStaticMemberType(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, LLVMMetadataRef Type, LLVMDIFlags Flags, LLVMValueRef ConstantVal, uint32_t AlignInBits)
Create debugging information entry for a C++ static data member.
Definition: DebugInfo.cpp:1396
uint16_t LLVMGetDINodeTag(LLVMMetadataRef MD)
Get the dwarf::Tag of a DINode.
Definition: DebugInfo.cpp:1561
LLVMMetadataRef LLVMDIBuilderCreateGlobalVariableExpression(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, const char *Linkage, size_t LinkLen, LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Ty, LLVMBool LocalToUnit, LLVMMetadataRef Expr, LLVMMetadataRef Decl, uint32_t AlignInBits)
Create a new descriptor for the specified variable.
Definition: DebugInfo.cpp:1622
LLVMMetadataRef LLVMDIBuilderCreateTempGlobalVariableFwdDecl(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, const char *Linkage, size_t LnkLen, LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Ty, LLVMBool LocalToUnit, LLVMMetadataRef Decl, uint32_t AlignInBits)
Create a new descriptor for the specified global variable that is temporary and meant to be RAUWed.
Definition: DebugInfo.cpp:1672
LLVMMetadataRef LLVMDIBuilderCreateQualifiedType(LLVMDIBuilderRef Builder, unsigned Tag, LLVMMetadataRef Type)
Create debugging information entry for a qualified type, e.g.
Definition: DebugInfo.cpp:1489
LLVMMetadataKind LLVMGetMetadataKind(LLVMMetadataRef Metadata)
Obtain the enumerated type of a Metadata instance.
Definition: DebugInfo.cpp:1844
LLVMMetadataRef LLVMDIBuilderCreateUnionType(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, LLVMDIFlags Flags, LLVMMetadataRef *Elements, unsigned NumElements, unsigned RunTimeLang, const char *UniqueId, size_t UniqueIdLen)
Create debugging information entry for a union.
Definition: DebugInfo.cpp:1308
LLVMMetadataRef LLVMDIBuilderCreateForwardDecl(LLVMDIBuilderRef Builder, unsigned Tag, const char *Name, size_t NameLen, LLVMMetadataRef Scope, LLVMMetadataRef File, unsigned Line, unsigned RuntimeLang, uint64_t SizeInBits, uint32_t AlignInBits, const char *UniqueIdentifier, size_t UniqueIdentifierLen)
Create a permanent forward-declared type.
Definition: DebugInfo.cpp:1463
LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, unsigned ArgNo, LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Ty, LLVMBool AlwaysPreserve, LLVMDIFlags Flags)
Create a new descriptor for a function parameter variable.
Definition: DebugInfo.cpp:1758
LLVMMetadataRef LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef Builder, LLVMMetadataRef File, LLVMMetadataRef *ParameterTypes, unsigned NumParameterTypes, LLVMDIFlags Flags)
Create subroutine type.
Definition: DebugInfo.cpp:1599
LLVMMetadataRef LLVMDIBuilderCreateObjCProperty(LLVMDIBuilderRef Builder, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNo, const char *GetterName, size_t GetterNameLen, const char *SetterName, size_t SetterNameLen, unsigned PropertyAttributes, LLVMMetadataRef Ty)
Create debugging information entry for Objective-C property.
Definition: DebugInfo.cpp:1422
LLVMMetadataRef LLVMDIBuilderCreateMacro(LLVMDIBuilderRef Builder, LLVMMetadataRef ParentMacroFile, unsigned Line, LLVMDWARFMacinfoRecordType RecordType, const char *Name, size_t NameLen, const char *Value, size_t ValueLen)
Create debugging information entry for a macro.
Definition: DebugInfo.cpp:1268
LLVMDWARFEmissionKind
The amount of debug information to emit.
Definition: DebugInfo.h:152
LLVMDbgRecordRef LLVMDIBuilderInsertLabelAtEnd(LLVMDIBuilderRef Builder, LLVMMetadataRef LabelInfo, LLVMMetadataRef Location, LLVMBasicBlockRef InsertAtEnd)
Insert a new llvm.dbg.label intrinsic call.
Definition: DebugInfo.cpp:1828
LLVMMetadataRef LLVMDIBuilderCreateArrayType(LLVMDIBuilderRef Builder, uint64_t Size, uint32_t AlignInBits, LLVMMetadataRef Ty, LLVMMetadataRef *Subscripts, unsigned NumSubscripts)
Create debugging information entry for an array.
Definition: DebugInfo.cpp:1324
LLVMDbgRecordRef LLVMDIBuilderInsertDbgValueRecordAtEnd(LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo, LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block)
Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).
Definition: DebugInfo.cpp:1732
LLVMMetadataRef LLVMDIScopeGetFile(LLVMMetadataRef Scope)
Get the metadata of the file associated with a given scope.
Definition: DebugInfo.cpp:1243
void LLVMDIBuilderFinalizeSubprogram(LLVMDIBuilderRef Builder, LLVMMetadataRef Subprogram)
Finalize a specific subprogram.
Definition: DebugInfo.cpp:1081
LLVMMetadataRef LLVMDIBuilderCreateConstantValueExpression(LLVMDIBuilderRef Builder, uint64_t Value)
Create a new descriptor for the specified variable that does not have an address, but does have a con...
Definition: DebugInfo.cpp:1617
LLVMMetadataRef LLVMDIBuilderCreateClassType(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, LLVMDIFlags Flags, LLVMMetadataRef DerivedFrom, LLVMMetadataRef *Elements, unsigned NumElements, LLVMMetadataRef VTableHolder, LLVMMetadataRef TemplateParamsNode, const char *UniqueIdentifier, size_t UniqueIdentifierLen)
Create debugging information entry for a class.
Definition: DebugInfo.cpp:1536
LLVMMetadataRef LLVMDIBuilderCreateMemberType(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNo, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, LLVMDIFlags Flags, LLVMMetadataRef Ty)
Create debugging information entry for a member.
Definition: DebugInfo.cpp:1380
unsigned LLVMDILocationGetLine(LLVMMetadataRef Location)
Get the line number of this debug location.
Definition: DebugInfo.cpp:1227
LLVMMetadataRef LLVMDIBuilderCreateNullPtrType(LLVMDIBuilderRef Builder)
Create C++11 nullptr type.
Definition: DebugInfo.cpp:1503
LLVMMetadataRef LLVMDIBuilderCreateInheritance(LLVMDIBuilderRef Builder, LLVMMetadataRef Ty, LLVMMetadataRef BaseTy, uint64_t BaseOffset, uint32_t VBPtrOffset, LLVMDIFlags Flags)
Create debugging information entry to establish inheritance relationship between two types.
Definition: DebugInfo.cpp:1453
LLVMMetadataRef LLVMDIBuilderCreateCompileUnit(LLVMDIBuilderRef Builder, LLVMDWARFSourceLanguage Lang, LLVMMetadataRef FileRef, const char *Producer, size_t ProducerLen, LLVMBool isOptimized, const char *Flags, size_t FlagsLen, unsigned RuntimeVer, const char *SplitName, size_t SplitNameLen, LLVMDWARFEmissionKind Kind, unsigned DWOId, LLVMBool SplitDebugInlining, LLVMBool DebugInfoForProfiling, const char *SysRoot, size_t SysRootLen, const char *SDK, size_t SDKLen)
A CompileUnit provides an anchor for all debugging information generated during this instance of comp...
Definition: DebugInfo.cpp:1086
LLVMBool LLVMStripModuleDebugInfo(LLVMModuleRef Module)
Strip debug info in the module if it exists.
Definition: DebugInfo.cpp:1069
LLVMDbgRecordRef LLVMDIBuilderInsertDeclareRecordBefore(LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo, LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr)
Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).
Definition: DebugInfo.cpp:1683
LLVMDbgRecordRef LLVMDIBuilderInsertLabelBefore(LLVMDIBuilderRef Builder, LLVMMetadataRef LabelInfo, LLVMMetadataRef Location, LLVMValueRef InsertBefore)
Insert a new llvm.dbg.label intrinsic call.
Definition: DebugInfo.cpp:1812
LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef Builder, const char *Name, size_t NameLen, uint64_t SizeInBits, LLVMDWARFTypeEncoding Encoding, LLVMDIFlags Flags)
Create debugging information entry for a basic type.
Definition: DebugInfo.cpp:1346
unsigned LLVMDIVariableGetLine(LLVMMetadataRef Var)
Get the source line where this DIVariable is declared.
Definition: DebugInfo.cpp:1651
LLVMDbgRecordRef LLVMDIBuilderInsertDbgValueRecordBefore(LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo, LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr)
Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).
Definition: DebugInfo.cpp:1716
unsigned LLVMDWARFTypeEncoding
An LLVM DWARF type encoding.
Definition: DebugInfo.h:204
LLVMMetadataRef LLVMDIBuilderCreateLexicalBlock(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef File, unsigned Line, unsigned Column)
Create a descriptor for a lexical block with the specified parent context.
Definition: DebugInfo.cpp:1150
LLVMMetadataRef LLVMDIBuilderGetOrCreateTypeArray(LLVMDIBuilderRef Builder, LLVMMetadataRef *Data, size_t NumElements)
Create a type array.
Definition: DebugInfo.cpp:1591
LLVMMetadataRef LLVMDIBuilderCreateReplaceableCompositeType(LLVMDIBuilderRef Builder, unsigned Tag, const char *Name, size_t NameLen, LLVMMetadataRef Scope, LLVMMetadataRef File, unsigned Line, unsigned RuntimeLang, uint64_t SizeInBits, uint32_t AlignInBits, LLVMDIFlags Flags, const char *UniqueIdentifier, size_t UniqueIdentifierLen)
Create a temporary forward-declared type.
Definition: DebugInfo.cpp:1475
const char * LLVMDIFileGetSource(LLVMMetadataRef File, unsigned *Len)
Get the source of a given file.
Definition: DebugInfo.cpp:1259
uint64_t LLVMDITypeGetOffsetInBits(LLVMMetadataRef DType)
Get the offset of this DIType in bits.
Definition: DebugInfo.cpp:1575
LLVMMetadataRef LLVMDIBuilderCreateImportedDeclaration(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef Decl, LLVMMetadataRef File, unsigned Line, const char *Name, size_t NameLen, LLVMMetadataRef *Elements, unsigned NumElements)
Create a descriptor for an imported function, type, or variable.
Definition: DebugInfo.cpp:1206
LLVMMetadataRef LLVMDIBuilderCreateFile(LLVMDIBuilderRef Builder, const char *Filename, size_t FilenameLen, const char *Directory, size_t DirectoryLen)
Create a file descriptor to hold debugging information for a file.
Definition: DebugInfo.cpp:1107
const char * LLVMDITypeGetName(LLVMMetadataRef DType, size_t *Length)
Get the name of this DIType.
Definition: DebugInfo.cpp:1565
unsigned LLVMMetadataKind
Definition: DebugInfo.h:199
LLVMMetadataRef LLVMDIBuilderCreateTypedef(LLVMDIBuilderRef Builder, LLVMMetadataRef Type, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Scope, uint32_t AlignInBits)
Create debugging information entry for a typedef.
Definition: DebugInfo.cpp:1443
LLVMMetadataRef LLVMDIBuilderCreateStructType(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, LLVMDIFlags Flags, LLVMMetadataRef DerivedFrom, LLVMMetadataRef *Elements, unsigned NumElements, unsigned RunTimeLang, LLVMMetadataRef VTableHolder, const char *UniqueId, size_t UniqueIdLen)
Create debugging information entry for a struct.
Definition: DebugInfo.cpp:1364
void LLVMDisposeDIBuilder(LLVMDIBuilderRef Builder)
Deallocates the DIBuilder and everything it owns.
Definition: DebugInfo.cpp:1073
LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef Builder, LLVMMetadataRef PointeeTy, uint64_t SizeInBits, uint32_t AlignInBits, unsigned AddressSpace, const char *Name, size_t NameLen)
Create debugging information entry for a pointer.
Definition: DebugInfo.cpp:1355
LLVMMetadataRef LLVMGetSubprogram(LLVMValueRef Func)
Get the metadata of the subprogram attached to a function.
Definition: DebugInfo.cpp:1780
@ LLVMDWARFMacinfoRecordTypeStartFile
Definition: DebugInfo.h:214
@ LLVMDWARFMacinfoRecordTypeVendorExt
Definition: DebugInfo.h:216
@ LLVMDWARFMacinfoRecordTypeEndFile
Definition: DebugInfo.h:215
@ LLVMDWARFMacinfoRecordTypeMacro
Definition: DebugInfo.h:213
@ LLVMDWARFMacinfoRecordTypeDefine
Definition: DebugInfo.h:212
@ LLVMDWARFSourceLanguageBLISS
Definition: DebugInfo.h:118
@ LLVMDWARFSourceLanguageJava
Definition: DebugInfo.h:90
@ LLVMDWARFSourceLanguageGOOGLE_RenderScript
Definition: DebugInfo.h:145
@ LLVMDWARFSourceLanguageOpenCL_CPP
Definition: DebugInfo.h:135
@ LLVMDWARFSourceLanguageSwift
Definition: DebugInfo.h:111
@ LLVMDWARFSourceLanguageCobol74
Definition: DebugInfo.h:83
@ LLVMDWARFSourceLanguageUPC
Definition: DebugInfo.h:97
@ LLVMDWARFSourceLanguageFortran03
Definition: DebugInfo.h:115
@ LLVMDWARFSourceLanguageAda2005
Definition: DebugInfo.h:126
@ LLVMDWARFSourceLanguageDylan
Definition: DebugInfo.h:113
@ LLVMDWARFSourceLanguageC_plus_plus_17
Definition: DebugInfo.h:122
@ LLVMDWARFSourceLanguageC_plus_plus_14
Definition: DebugInfo.h:114
@ LLVMDWARFSourceLanguageC
Definition: DebugInfo.h:80
@ LLVMDWARFSourceLanguageC_plus_plus_20
Definition: DebugInfo.h:123
@ LLVMDWARFSourceLanguageCPP_for_OpenCL
Definition: DebugInfo.h:136
@ LLVMDWARFSourceLanguageAda95
Definition: DebugInfo.h:92
@ LLVMDWARFSourceLanguageD
Definition: DebugInfo.h:98
@ LLVMDWARFSourceLanguageAda2012
Definition: DebugInfo.h:127
@ LLVMDWARFSourceLanguageGLSL_ES
Definition: DebugInfo.h:133
@ LLVMDWARFSourceLanguageMove
Definition: DebugInfo.h:139
@ LLVMDWARFSourceLanguageCobol85
Definition: DebugInfo.h:84
@ LLVMDWARFSourceLanguageKotlin
Definition: DebugInfo.h:119
@ LLVMDWARFSourceLanguageModula2
Definition: DebugInfo.h:88
@ LLVMDWARFSourceLanguageC_plus_plus
Definition: DebugInfo.h:82
@ LLVMDWARFSourceLanguageC99
Definition: DebugInfo.h:91
@ LLVMDWARFSourceLanguageMojo
Definition: DebugInfo.h:131
@ LLVMDWARFSourceLanguageOpenCL
Definition: DebugInfo.h:102
@ LLVMDWARFSourceLanguageHylo
Definition: DebugInfo.h:140
@ LLVMDWARFSourceLanguageRust
Definition: DebugInfo.h:109
@ LLVMDWARFSourceLanguageFortran90
Definition: DebugInfo.h:86
@ LLVMDWARFSourceLanguageJulia
Definition: DebugInfo.h:112
@ LLVMDWARFSourceLanguageModula3
Definition: DebugInfo.h:104
@ LLVMDWARFSourceLanguageGo
Definition: DebugInfo.h:103
@ LLVMDWARFSourceLanguageObjC
Definition: DebugInfo.h:95
@ LLVMDWARFSourceLanguageGLSL
Definition: DebugInfo.h:132
@ LLVMDWARFSourceLanguageC_sharp
Definition: DebugInfo.h:130
@ LLVMDWARFSourceLanguageBORLAND_Delphi
Definition: DebugInfo.h:146
@ LLVMDWARFSourceLanguageFortran77
Definition: DebugInfo.h:85
@ LLVMDWARFSourceLanguageMips_Assembler
Definition: DebugInfo.h:144
@ LLVMDWARFSourceLanguageRuby
Definition: DebugInfo.h:138
@ LLVMDWARFSourceLanguageHIP
Definition: DebugInfo.h:128
@ LLVMDWARFSourceLanguageObjC_plus_plus
Definition: DebugInfo.h:96
@ LLVMDWARFSourceLanguageFortran08
Definition: DebugInfo.h:116
@ LLVMDWARFSourceLanguagePascal83
Definition: DebugInfo.h:87
@ LLVMDWARFSourceLanguagePLI
Definition: DebugInfo.h:94
@ LLVMDWARFSourceLanguageC17
Definition: DebugInfo.h:124
@ LLVMDWARFSourceLanguageC11
Definition: DebugInfo.h:110
@ LLVMDWARFSourceLanguageMetal
Definition: DebugInfo.h:141
@ LLVMDWARFSourceLanguageFortran95
Definition: DebugInfo.h:93
@ LLVMDWARFSourceLanguageC_plus_plus_03
Definition: DebugInfo.h:106
@ LLVMDWARFSourceLanguageFortran18
Definition: DebugInfo.h:125
@ LLVMDWARFSourceLanguageC89
Definition: DebugInfo.h:79
@ LLVMDWARFSourceLanguagePython
Definition: DebugInfo.h:100
@ LLVMDWARFSourceLanguageRenderScript
Definition: DebugInfo.h:117
@ LLVMDWARFSourceLanguageAssembly
Definition: DebugInfo.h:129
@ LLVMDWARFSourceLanguageSYCL
Definition: DebugInfo.h:137
@ LLVMDWARFSourceLanguageCrystal
Definition: DebugInfo.h:121
@ LLVMDWARFSourceLanguageOCaml
Definition: DebugInfo.h:108
@ LLVMDWARFSourceLanguageZig
Definition: DebugInfo.h:120
@ LLVMDWARFSourceLanguageHaskell
Definition: DebugInfo.h:105
@ LLVMDWARFSourceLanguageC_plus_plus_11
Definition: DebugInfo.h:107
@ LLVMDWARFSourceLanguageHLSL
Definition: DebugInfo.h:134
@ LLVMDWARFSourceLanguageAda83
Definition: DebugInfo.h:81
@ LLVMDIFlagBigEndian
Definition: DebugInfo.h:65
@ LLVMDIFlagPrivate
Definition: DebugInfo.h:36
@ LLVMDIFlagPrototyped
Definition: DebugInfo.h:45
@ LLVMDIFlagBitField
Definition: DebugInfo.h:57
@ LLVMDIFlagObjcClassComplete
Definition: DebugInfo.h:46
@ LLVMDIFlagAccessibility
Definition: DebugInfo.h:68
@ LLVMDIFlagRValueReference
Definition: DebugInfo.h:51
@ LLVMDIFlagProtected
Definition: DebugInfo.h:37
@ LLVMDIFlagIntroducedVirtual
Definition: DebugInfo.h:56
@ LLVMDIFlagAppleBlock
Definition: DebugInfo.h:40
@ LLVMDIFlagTypePassByReference
Definition: DebugInfo.h:60
@ LLVMDIFlagFixedEnum
Definition: DebugInfo.h:62
@ LLVMDIFlagNoReturn
Definition: DebugInfo.h:58
@ LLVMDIFlagExplicit
Definition: DebugInfo.h:44
@ LLVMDIFlagMultipleInheritance
Definition: DebugInfo.h:54
@ LLVMDIFlagThunk
Definition: DebugInfo.h:63
@ LLVMDIFlagIndirectVirtualBase
Definition: DebugInfo.h:67
@ LLVMDIFlagLittleEndian
Definition: DebugInfo.h:66
@ LLVMDIFlagReservedBit4
Definition: DebugInfo.h:41
@ LLVMDIFlagArtificial
Definition: DebugInfo.h:43
@ LLVMDIFlagPublic
Definition: DebugInfo.h:38
@ LLVMDIFlagStaticMember
Definition: DebugInfo.h:49
@ LLVMDIFlagVector
Definition: DebugInfo.h:48
@ LLVMDIFlagPtrToMemberRep
Definition: DebugInfo.h:70
@ LLVMDIFlagVirtual
Definition: DebugInfo.h:42
@ LLVMDIFlagSingleInheritance
Definition: DebugInfo.h:53
@ LLVMDIFlagVirtualInheritance
Definition: DebugInfo.h:55
@ LLVMDIFlagReserved
Definition: DebugInfo.h:52
@ LLVMDIFlagTypePassByValue
Definition: DebugInfo.h:59
@ LLVMDIFlagEnumClass
Definition: DebugInfo.h:61
@ LLVMDIFlagFwdDecl
Definition: DebugInfo.h:39
@ LLVMDIFlagLValueReference
Definition: DebugInfo.h:50
@ LLVMDIFlagObjectPointer
Definition: DebugInfo.h:47
@ LLVMDIFlagNonTrivial
Definition: DebugInfo.h:64
@ LLVMDIFlagZero
Definition: DebugInfo.h:35
@ LLVMDWARFEmissionLineTablesOnly
Definition: DebugInfo.h:155
@ LLVMDWARFEmissionFull
Definition: DebugInfo.h:154
@ LLVMDWARFEmissionNone
Definition: DebugInfo.h:153
@ LLVMGenericDINodeMetadataKind
Definition: DebugInfo.h:170
@ LLVMDIDerivedTypeMetadataKind
Definition: DebugInfo.h:174
@ LLVMDIMacroMetadataKind
Definition: DebugInfo.h:191
@ LLVMDILexicalBlockMetadataKind
Definition: DebugInfo.h:180
@ LLVMMDTupleMetadataKind
Definition: DebugInfo.h:166
@ LLVMDIExpressionMetadataKind
Definition: DebugInfo.h:168
@ LLVMDIGlobalVariableExpressionMetadataKind
Definition: DebugInfo.h:169
@ LLVMLocalAsMetadataMetadataKind
Definition: DebugInfo.h:164
@ LLVMDILocalVariableMetadataKind
Definition: DebugInfo.h:187
@ LLVMDILocationMetadataKind
Definition: DebugInfo.h:167
@ LLVMDistinctMDOperandPlaceholderMetadataKind
Definition: DebugInfo.h:165
@ LLVMDILexicalBlockFileMetadataKind
Definition: DebugInfo.h:181
@ LLVMDIMacroFileMetadataKind
Definition: DebugInfo.h:192
@ LLVMDIArgListMetadataKind
Definition: DebugInfo.h:196
@ LLVMDITemplateTypeParameterMetadataKind
Definition: DebugInfo.h:184
@ LLVMDIImportedEntityMetadataKind
Definition: DebugInfo.h:190
@ LLVMDIGlobalVariableMetadataKind
Definition: DebugInfo.h:186
@ LLVMDIAssignIDMetadataKind
Definition: DebugInfo.h:197
@ LLVMDISubrangeMetadataKind
Definition: DebugInfo.h:171
@ LLVMDITemplateValueParameterMetadataKind
Definition: DebugInfo.h:185
@ LLVMDIObjCPropertyMetadataKind
Definition: DebugInfo.h:189
@ LLVMDINamespaceMetadataKind
Definition: DebugInfo.h:182
@ LLVMDIGenericSubrangeMetadataKind
Definition: DebugInfo.h:195
@ LLVMDICompileUnitMetadataKind
Definition: DebugInfo.h:178
@ LLVMDICompositeTypeMetadataKind
Definition: DebugInfo.h:175
@ LLVMMDStringMetadataKind
Definition: DebugInfo.h:162
@ LLVMDIEnumeratorMetadataKind
Definition: DebugInfo.h:172
@ LLVMDIFileMetadataKind
Definition: DebugInfo.h:177
@ LLVMDIModuleMetadataKind
Definition: DebugInfo.h:183
@ LLVMDIBasicTypeMetadataKind
Definition: DebugInfo.h:173
@ LLVMConstantAsMetadataMetadataKind
Definition: DebugInfo.h:163
@ LLVMDIStringTypeMetadataKind
Definition: DebugInfo.h:194
@ LLVMDICommonBlockMetadataKind
Definition: DebugInfo.h:193
@ LLVMDILabelMetadataKind
Definition: DebugInfo.h:188
@ LLVMDISubprogramMetadataKind
Definition: DebugInfo.h:179
@ LLVMDISubroutineTypeMetadataKind
Definition: DebugInfo.h:176
struct LLVMOpaqueValue * LLVMValueRef
Represents an individual value in LLVM IR.
Definition: Types.h:75
int LLVMBool
Definition: Types.h:28
struct LLVMOpaqueDbgRecord * LLVMDbgRecordRef
Definition: Types.h:175
struct LLVMOpaqueContext * LLVMContextRef
The top-level container for all LLVM global data.
Definition: Types.h:53
struct LLVMOpaqueBasicBlock * LLVMBasicBlockRef
Represents a basic block of instructions in LLVM IR.
Definition: Types.h:82
struct LLVMOpaqueMetadata * LLVMMetadataRef
Represents an LLVM Metadata.
Definition: Types.h:89
struct LLVMOpaqueModule * LLVMModuleRef
The top-level container for all other LLVM Intermediate Representation (IR) objects.
Definition: Types.h:61
struct LLVMOpaqueDIBuilder * LLVMDIBuilderRef
Represents an LLVM debug info builder.
Definition: Types.h:117
Helper object to track which of three possible relocation mechanisms are used for a particular value ...