首页 > 代码库 > QualType in clang
QualType in clang
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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。