[llvm-dev] Force casting a Value*

Dipanjan Das via llvm-dev llvm-dev at lists.llvm.org
Sun Jun 11 03:05:46 PDT 2017


I am trying to cast a Value* irrespective of  its underlying subclass to
uint64 and pass it on to a method as an argument.

if (StoreInst *store_inst = dyn_cast<StoreInst>(&I)) {
                    Value* vo = store_inst->getValueOperand();
                     uint64 value = /* cast vo to unsigned int 64 bit */
                     func(value);
                }

How can I force cast 'vo' to unsigned int?

-- 

Thanks & Regards,
Dipanjan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170611/f2b8badf/attachment-0001.html>


More information about the llvm-dev mailing list