Lines Matching defs:LLVM
1 //===- LLVM.cpp - C Interface for LLVM dialect ----------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
9 #include "mlir-c/Dialect/LLVM.h"
22 using namespace mlir::LLVM;
24 MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(LLVM, llvm, LLVMDialect)
31 return isa<LLVM::LLVMPointerType>(unwrap(type));
35 return cast<LLVM::LLVMPointerType>(unwrap(pointerType)).getAddressSpace();
47 return wrap(cast<LLVM::LLVMArrayType>(unwrap(type)).getElementType());
59 return llvm::cast<LLVM::LLVMFunctionType>(unwrap(type)).getNumParams();
64 return wrap(llvm::cast<LLVM::LLVMFunctionType>(unwrap(type))
69 return isa<LLVM::LLVMStructType>(unwrap(type));
73 return !cast<LLVM::LLVMStructType>(unwrap(type)).isIdentified();
77 return cast<LLVM::LLVMStructType>(unwrap(type)).getBody().size();
81 return wrap(cast<LLVM::LLVMStructType>(unwrap(type)).getBody()[position]);
85 return cast<LLVM::LLVMStructType>(unwrap(type)).isPacked();
89 return wrap(cast<LLVM::LLVMStructType>(unwrap(type)).getName());
93 return cast<LLVM::LLVMStructType>(unwrap(type)).isOpaque();
139 cast<LLVM::LLVMStructType>(unwrap(structType))