Issue |
129439
|
Summary |
[llvm-c] `ConstantDataArray` constructors for element types other than `i8`
|
Labels |
new issue
|
Assignees |
|
Reporter |
HertzDevil
|
We from the Crystal programming language would like to support embedding large amounts of scalar data as LLVM constants during code generation, but without having to go through the `LLVMValueRef`s, since we found that step to be relatively time-consuming. It came to our attention that arrays of `i8`s are already essentially supported via `LLVMConstStringInContext2`, but the underlying `llvm::ConstantDataArray` supports a few more data types. We would like to close this gap in the official C API:
```c
const char *LLVMGetRawDataValues(LLVMValueRef c, size_t *SizeInBytes);
LLVMValueRef LLVMConstDataArray(LLVMTypeRef ElementTy, const char *Data, size_t SizeInBytes);
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs