[LLVMdev] Fwd: [cfe-dev] Explanation of the llvm::PointerIntPair data structure

kwadwo amankwa que at lunarblack.com
Fri Mar 7 11:26:40 PST 2014



Hi ,
I'm studying the llvm/clang source I came accross this line ;

97: mutable  llvm::PointerIntPair<const llvm::MemoryBuffer *, 2> Buffer;


in SourceManager.h and I am curious as to the rationale behind using the
PointerPair data structure ?I read the documentation about bit mangling
and  I would be greatful if someone could provide an explanation for the
rationale behind this technique.


thanks ,
que






More information about the llvm-dev mailing list