diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-03-05 01:03:53 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-03-05 01:03:53 +0000 |
commit | 11e6f0a6c30e4352f8146f9d7e3c9439c67f3f3d (patch) | |
tree | b715b9189c297184a94e31b3663fc97944ec39d1 /clang/tools/libclang/CIndexInclusionStack.cpp | |
parent | 4954bc1d9d68bfbe6d39cf2c6d7a5d9944e31a73 (diff) | |
download | bcm5719-llvm-11e6f0a6c30e4352f8146f9d7e3c9439c67f3f3d.tar.gz bcm5719-llvm-11e6f0a6c30e4352f8146f9d7e3c9439c67f3f3d.zip |
Currently we can only remap a file by creating a MemoryBuffer and replacing the file contents with it.
Allow remapping a file by specifying another filename whose contents should be loaded if the original
file gets loaded. This allows to override files without having to create & load buffers in advance.
llvm-svn: 127052
Diffstat (limited to 'clang/tools/libclang/CIndexInclusionStack.cpp')
-rw-r--r-- | clang/tools/libclang/CIndexInclusionStack.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/tools/libclang/CIndexInclusionStack.cpp b/clang/tools/libclang/CIndexInclusionStack.cpp index e0f4d42defd..9ea901927f8 100644 --- a/clang/tools/libclang/CIndexInclusionStack.cpp +++ b/clang/tools/libclang/CIndexInclusionStack.cpp @@ -47,7 +47,7 @@ void clang_getInclusions(CXTranslationUnit TU, CXInclusionVisitor CB, continue; const SrcMgr::FileInfo &FI = SL.getFile(); - if (!FI.getContentCache()->Entry) + if (!FI.getContentCache()->OrigEntry) continue; // Build the inclusion stack. @@ -61,7 +61,7 @@ void clang_getInclusions(CXTranslationUnit TU, CXInclusionVisitor CB, // Callback to the client. // FIXME: We should have a function to construct CXFiles. - CB((CXFile) FI.getContentCache()->Entry, + CB((CXFile) FI.getContentCache()->OrigEntry, InclusionStack.data(), InclusionStack.size(), clientData); } } |