[llvm-commits] Enhance C bindings with volatile load/store
Yiannis Tsiouris
gtsiour at softlab.ntua.gr
Sat Feb 25 04:40:56 PST 2012
> This is close, but won't quite work. I'd suggest something along the lines of:
>
> Value *P = unwrap<Value>(MemAccessInst);
> if (LoadInst *LI = dyn_cast<LoadInst>(P))
> return LI->isVolatile();
> return cast<StoreInst>(P)->isVolatile();
>
> The important thing here is that "unwrap" crashes if passed something of the wrong type.
>
> -Chris
>
Hi Chris,
Thanks for the hints! The attached patch does it the "proper" way. :-)
~y.
--
Yiannis Tsiouris
Ph.D. student,
Software Engineering Laboratory,
National Technical University of Athens
WWW: http://www.softlab.ntua.gr/~gtsiour
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VolLoadStore-3.patch
Type: text/x-patch
Size: 1568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120225/2e0da0b3/attachment.bin>
More information about the llvm-commits
mailing list