[PATCH] ADT: Remove misaligned pointeres from DenseMapInfo
David Majnemer
david.majnemer at gmail.com
Sun Sep 21 05:25:27 PDT 2014
Hi samsonov, rsmith, hfinkel, nicholas, nlewycky, chandlerc,
C++ requires that pointers point to sufficiently well aligned addresses.
getEmptyKey() and getTombstoneKey() would cast -1 and -2 to arbitrary
pointer types which would violate this requirement.
In an ideal world, we would query the alignment of the pointee type;
however, the pointee type might be incomplete (this is often the case in
LLVM/Clang). Instead, assume that no type is more aligned than 16383
bytes.
http://reviews.llvm.org/D5428
Files:
include/llvm/ADT/DenseMapInfo.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5428.13909.patch
Type: text/x-patch
Size: 799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140921/10e92615/attachment.bin>
More information about the llvm-commits
mailing list