[llvm-commits] ObjectFile / DataRefImpl constructor

Danil Malyshev dmalyshev at accesssoftek.com
Thu Apr 5 17:22:10 PDT 2012

Hello everyone,

The DataRefImpl usually initialized with 0 after creation. If somewhere it will not be initialized, it's will have potential problem, for example:
DataRefImpl a, b;
a.p = 0;
b.p = 0;
if (a == b) // can be false for 32 bit platforms and always true for 64 bit.
Please review attached the patch, it's adds constructor for DataRefImpl and removes excess initialization.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120405/639c3897/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DataRefImpl_constructor-01.patch
Type: application/octet-stream
Size: 10267 bytes
Desc: DataRefImpl_constructor-01.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120405/639c3897/attachment.obj>

More information about the llvm-commits mailing list