mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-27 14:16:09 +00:00
[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
This commit is contained in:
parent
043364a681
commit
c94e63d557
@ -478,6 +478,19 @@ LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef Builder,
|
||||
unsigned NumParameterTypes,
|
||||
LLVMDIFlags Flags);
|
||||
|
||||
/**
|
||||
* Create debugging information entry for an enumerator.
|
||||
* @param Builder The DIBuilder.
|
||||
* @param Name Enumerator name.
|
||||
* @param NameLen Length of enumerator name.
|
||||
* @param Value Enumerator value.
|
||||
* @param IsUnsigned True if the value is unsigned.
|
||||
*/
|
||||
LLVMMetadataRef LLVMDIBuilderCreateEnumerator(LLVMDIBuilderRef Builder,
|
||||
const char *Name, size_t NameLen,
|
||||
int64_t Value,
|
||||
LLVMBool IsUnsigned);
|
||||
|
||||
/**
|
||||
* Create debugging information entry for an enumeration.
|
||||
* \param Builder The DIBuilder.
|
||||
|
@ -899,6 +899,14 @@ LLVMMetadataRef LLVMDILocationGetScope(LLVMMetadataRef Location) {
|
||||
return wrap(unwrapDI<DILocation>(Location)->getScope());
|
||||
}
|
||||
|
||||
LLVMMetadataRef LLVMDIBuilderCreateEnumerator(LLVMDIBuilderRef Builder,
|
||||
const char *Name, size_t NameLen,
|
||||
int64_t Value,
|
||||
LLVMBool IsUnsigned) {
|
||||
return wrap(unwrap(Builder)->createEnumerator({Name, NameLen}, Value,
|
||||
IsUnsigned != 0));
|
||||
}
|
||||
|
||||
LLVMMetadataRef LLVMDIBuilderCreateEnumerationType(
|
||||
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
|
||||
size_t NameLen, LLVMMetadataRef File, unsigned LineNumber,
|
||||
|
Loading…
x
Reference in New Issue
Block a user