From 11e6f0a6c30e4352f8146f9d7e3c9439c67f3f3d Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Sat, 5 Mar 2011 01:03:53 +0000 Subject: 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 --- clang/tools/libclang/CIndexInclusionStack.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/tools/libclang/CIndexInclusionStack.cpp') 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); } } -- cgit v1.2.3