[llvm-dev] Help to understand LoadValueFromMemory

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 18 01:11:31 PDT 2019


On Wed, 17 Jul 2019 at 20:44, Alberto Barbaro via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I think this should not be the case considering that Type I think is a Vector.

But from your own code:

> source->getPointerOperand()->getType()->dump(); //[40 x i8]*

[40 x i8]* is a pointer to an array. LoadValueFromMemory doesn't seem
to support loading an array type directly, so you either have to load
all bytes individually or use "(char *) Ptr->PointerVal". At least it
looks like that second one ought to work from the implementation of
LoadValueFromMemory.

Cheers.

Tim.


More information about the llvm-dev mailing list