diff options
author | dim <dim@FreeBSD.org> | 2011-05-02 19:39:53 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-05-02 19:39:53 +0000 |
commit | 110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab (patch) | |
tree | 64a10f4c4154739d4a8191d7e1b52ce497f4ebd6 /tools/libclang/CIndexInclusionStack.cpp | |
parent | a0fb00f9837bd0d2e5948f16f6a6b82a7a628f51 (diff) | |
download | FreeBSD-src-110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab.zip FreeBSD-src-110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab.tar.gz |
Vendor import of clang trunk r130700:
http://llvm.org/svn/llvm-project/cfe/trunk@130700
Diffstat (limited to 'tools/libclang/CIndexInclusionStack.cpp')
-rw-r--r-- | tools/libclang/CIndexInclusionStack.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/libclang/CIndexInclusionStack.cpp b/tools/libclang/CIndexInclusionStack.cpp index e0f4d42..6bc4f2e 100644 --- a/tools/libclang/CIndexInclusionStack.cpp +++ b/tools/libclang/CIndexInclusionStack.cpp @@ -40,14 +40,14 @@ void clang_getInclusions(CXTranslationUnit TU, CXInclusionVisitor CB, i = 0; for ( ; i < n ; ++i) { - - const SrcMgr::SLocEntry &SL = SM.getSLocEntry(i); + bool Invalid = false; + const SrcMgr::SLocEntry &SL = SM.getSLocEntry(i, &Invalid); - if (!SL.isFile()) + if (!SL.isFile() || Invalid) 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); } } |