Skip to content

Commit e18bd99

Browse files
lanzaadrian-prantl
authored andcommitted
Convert a clang::Module to non-const to account for a clang API change
An upstream clang changed ASTSourceDescriptor to not have a const Module pointer. const_cast here to make this agree. (cherry picked from commit a49bcee)
1 parent f5afb3a commit e18bd99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3310,7 +3310,7 @@ ClangModuleUnit::ClangModuleUnit(ModuleDecl &M,
33103310
clangModule(clangModule) {
33113311
// Capture the file metadata before it goes away.
33123312
if (clangModule)
3313-
ASTSourceDescriptor = {*clangModule};
3313+
ASTSourceDescriptor = {*const_cast<clang::Module *>(clangModule)};
33143314
}
33153315

33163316
StringRef ClangModuleUnit::getModuleDefiningPath() const {

0 commit comments

Comments
 (0)