hanchenye-llvm-project/clang/test/Index/Inputs
Douglas Gregor 925296b4c2 Revamp the SourceManager to separate the representation of parsed
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
2011-07-19 16:10:42 +00:00
..
a.h When setting the globally-visible declarations for a particular 2010-09-24 23:29:12 +00:00
b.h When setting the globally-visible declarations for a particular 2010-09-24 23:29:12 +00:00
c-index-pch.h
cindex-from-source.h
complete-pch.h Make code-completion for Objective-C message sends to "id" work in the 2010-04-06 17:30:22 +00:00
crash-recovery-code-complete-remap.c libclang: Execute clang_codeCompleteAt() inside a crash recovery context. 2010-08-19 23:44:10 +00:00
crash-recovery-reparse-remap.c Fix a loop overrun in ComputePreamble when the last remapped file was erased, 2010-08-19 19:40:40 +00:00
foo.h
get-cursor-includes-1.h When determining which preprocessed entities to traverse in libclang, 2010-12-21 19:07:48 +00:00
get-cursor-includes-2.h When determining which preprocessed entities to traverse in libclang, 2010-12-21 19:07:48 +00:00
guarded.h Introduce a new libclang API, clang_isFileMultipleIncludeGuarded(), 2011-05-04 00:14:37 +00:00
lit.local.cfg
objc.h
pragma-once.h Introduce a new libclang API, clang_isFileMultipleIncludeGuarded(), 2011-05-04 00:14:37 +00:00
preamble-reparse-1.c When we decide not to reuse a precompiled preamble, clear out the 2010-08-20 00:02:33 +00:00
preamble-reparse-2.c When we decide not to reuse a precompiled preamble, clear out the 2010-08-20 00:02:33 +00:00
preamble.h When using a precompiled preamble, save the diagnostics produced when 2010-08-02 20:51:39 +00:00
preamble_macro_template.h Revamp the SourceManager to separate the representation of parsed 2011-07-19 16:10:42 +00:00
prefix.h When remapping a virtual file, also make an entry for the file with 2010-07-26 23:54:23 +00:00
remap-complete-to.c Make sure that we have File IDs for all of the unsaved files before we 2010-03-24 21:04:06 +00:00
remap-load-to.c
t1.c
t1.m
t2.c
t2.m