forked from OSchip/llvm-project
925296b4c2
source locations from source locations loaded from an AST/PCH file. Previously, loading an AST/PCH file involved carefully pre-allocating space at the beginning of the source manager for the source locations and FileIDs that correspond to the prefix, and then appending the source locations/FileIDs used for parsing the remaining translation unit. This design forced us into loading PCH files early, as a prefix, whic has become a rather significant limitation. This patch splits the SourceManager space into two parts: for source location "addresses", the lower values (growing upward) are used to describe parsed code, while upper values (growing downward) are used for source locations loaded from AST/PCH files. Similarly, positive FileIDs are used to describe parsed code while negative FileIDs are used to file/macro locations loaded from AST/PCH files. As a result, we can load PCH/AST files even during parsing, making various improvemnts in the future possible, e.g., teaching #include <foo.h> to look for and load <foo.h.gch> if it happens to be already available. This patch was originally written by Sebastian Redl, then brought forward to the modern age by Jonathan Turner, and finally polished/finished by me to be committed. llvm-svn: 135484 |
||
---|---|---|
.. | ||
a.h | ||
b.h | ||
c-index-pch.h | ||
cindex-from-source.h | ||
complete-pch.h | ||
crash-recovery-code-complete-remap.c | ||
crash-recovery-reparse-remap.c | ||
foo.h | ||
get-cursor-includes-1.h | ||
get-cursor-includes-2.h | ||
guarded.h | ||
lit.local.cfg | ||
objc.h | ||
pragma-once.h | ||
preamble-reparse-1.c | ||
preamble-reparse-2.c | ||
preamble.h | ||
preamble_macro_template.h | ||
prefix.h | ||
remap-complete-to.c | ||
remap-load-to.c | ||
t1.c | ||
t1.m | ||
t2.c | ||
t2.m |