首页 > 其他 > 详细

QualType in clang

时间:2014-10-19 15:32:28      阅读:282      评论:0      收藏:0      [点我收藏+]

  http://clang.llvm.org/docs/InternalsManual.html#the-qualtype-class

the QualType class is designed to be an efficient value class which contains a pointer to the unqualified type together with the qualifiers (const, volatile etc.). The class is implemented as a llvm::PointerIntPair

/// PointerIntPair - This class implements a pair of a pointer and small
/// integer.  It is designed to represent this in the space required by one
/// pointer by bitmangling the integer into the low part of the pointer.  This
/// can only be done for small integers: typically up to 3 bits, but it depends
/// on the number of bits available according to PointerLikeTypeTraits for the
/// type.
///
/// Note that PointerIntPair always puts the IntVal part in the highest bits
/// possible.  For example, PointerIntPair<void*, 1, bool> will put the bit for
/// the bool into bit #2, not bit #0, which allows the low two bits to be used
/// for something else.  For example, this allows:
///   PointerIntPair<PointerIntPair<void*, 1, bool>, 1, bool>
/// ... and the two bools will land in different bits.

  

QualType in clang

原文:http://www.cnblogs.com/qsort/p/4034889.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!