Fix Casting
Use const_cast<> to avoid a cast-away-const error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172562 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CIndexInclusionStack.cpp b/tools/libclang/CIndexInclusionStack.cpp
index f613f0f..4ee1467 100644
--- a/tools/libclang/CIndexInclusionStack.cpp
+++ b/tools/libclang/CIndexInclusionStack.cpp
@@ -64,7 +64,8 @@
// Callback to the client.
// FIXME: We should have a function to construct CXFiles.
- CB((CXFile) FI.getContentCache()->OrigEntry,
+ CB(static_cast<CXFile>(
+ const_cast<FileEntry *>(FI.getContentCache()->OrigEntry)),
InclusionStack.data(), InclusionStack.size(), clientData);
}
}