[llvm-dev] Cast between struct
Jie Zhou via llvm-dev
llvm-dev at lists.llvm.org
Wed May 6 17:16:56 PDT 2020
Dear All,
In my development, a function returns a struct {i8*, i64}, and on the
call site I need to assign the return value to a struct of type {some_struct*, i64}.
One way to do it is to call the mutateType() method of llvm::Value on
the return value of the function call; however, I’m concerned that this mutateType()
method might be too disruptive (it’s discouraged to use it by the documentation).
Since LLVM does not support cast between structs. Is there any way I can safely
“cast” a value of one struct type to another?
Thanks,
- Jie
More information about the llvm-dev
mailing list