llvm.org GIT mirror llvm / c94e63d
[LLVM-C] Add bindings to create enumerators Summary: The C API don't have the bindings to create enumerators, needed to create an enumeration. Reviewers: whitequark, CodaFi, harlanhaskins, deadalnix Reviewed By: whitequark, CodaFi, harlanhaskins Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58323 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354237 91177308-0d34-0410-b5e6-96231b3b80d8 Robert Widmann 6 months ago
2 changed file(s) with 21 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
478478 LLVMDIFlags Flags);
479479
480480 /**
481 * Create debugging information entry for an enumerator.
482 * @param Builder The DIBuilder.
483 * @param Name Enumerator name.
484 * @param NameLen Length of enumerator name.
485 * @param Value Enumerator value.
486 * @param IsUnsigned True if the value is unsigned.
487 */
488 LLVMMetadataRef LLVMDIBuilderCreateEnumerator(LLVMDIBuilderRef Builder,
489 const char *Name, size_t NameLen,
490 int64_t Value,
491 LLVMBool IsUnsigned);
492
493 /**
481494 * Create debugging information entry for an enumeration.
482495 * \param Builder The DIBuilder.
483496 * \param Scope Scope in which this enumeration is defined.
898898 return wrap(unwrapDI(Location)->getScope());
899899 }
900900
901 LLVMMetadataRef LLVMDIBuilderCreateEnumerator(LLVMDIBuilderRef Builder,
902 const char *Name, size_t NameLen,
903 int64_t Value,
904 LLVMBool IsUnsigned) {
905 return wrap(unwrap(Builder)->createEnumerator({Name, NameLen}, Value,
906 IsUnsigned != 0));
907 }
908
901909 LLVMMetadataRef LLVMDIBuilderCreateEnumerationType(
902910 LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
903911 size_t NameLen, LLVMMetadataRef File, unsigned LineNumber,