aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/CIndexInclusionStack.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-03-05 01:03:53 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-03-05 01:03:53 +0000
commitb1c86492f9a9bef01a4567408c22f961bbd604fe (patch)
tree379b4af3319f280c1a1f938a6f39a21d97f896ec /tools/libclang/CIndexInclusionStack.cpp
parent15727ddb11405c45372150b5bfb07dbfa4c9960b (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/CIndexInclusionStack.cpp')
-rw-r--r--tools/libclang/CIndexInclusionStack.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libclang/CIndexInclusionStack.cpp b/tools/libclang/CIndexInclusionStack.cpp
index e0f4d42def..9ea901927f 100644
--- a/tools/libclang/CIndexInclusionStack.cpp
+++ b/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);
}
}