mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-05 11:17:53 +00:00
C/OCaml API to retrieve struct name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141285 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -302,6 +302,14 @@ LLVMTypeRef LLVMStructCreateNamed(LLVMContextRef C, const char *Name)
|
||||
return wrap(StructType::create(*unwrap(C), Name));
|
||||
}
|
||||
|
||||
const char *LLVMGetStructName(LLVMTypeRef Ty)
|
||||
{
|
||||
StructType *Type = unwrap<StructType>(Ty);
|
||||
if (!Type->hasName())
|
||||
return 0;
|
||||
return Type->getName().data();
|
||||
}
|
||||
|
||||
void LLVMStructSetBody(LLVMTypeRef StructTy, LLVMTypeRef *ElementTypes,
|
||||
unsigned ElementCount, LLVMBool Packed) {
|
||||
ArrayRef<Type*> Tys(unwrap(ElementTypes), ElementCount);
|
||||
|
Reference in New Issue
Block a user