Introduce a global bit-offset continuous range map into the ASTReader,
so that we have one, simple way to map from global bit offsets to local bit offsets. Eliminates a number of loops over the chain, and generalizes for more interesting bit remappings. Also, as an amusing oddity, we were computing global bit offsets *backwards* for preprocessed entities (e.g., the directly included PCH file in the chain would start at offset zero, rather than the original PCH that occurs first in translation unit). Even more amusingly, it made precompiled preambles work, because we were forgetting to adjust the local bit offset to a global bit offset when storing preprocessed entity offsets in the ASTUnit. Two wrongs made a right, and now they're both right. llvm-svn: 135750
Loading
Please register or sign in to comment