Compare commits

..

2 Commits

Author SHA1 Message Date
rherilier
f359ea4377
Merge 5d401fc95d into d31cc9f076 2025-11-30 14:08:04 +02:00
Fangrui Song
d31cc9f076 Adapt llvm 22 changes
Type::Elaborated is removed by llvmorg-22-init-3166-g91cdd35008e9

llvm::sys::fs and clang functions are changed due to
https://discourse.llvm.org/t/rfc-file-system-sandboxing-in-clang-llvm/88791
2025-11-29 21:53:40 -08:00
2 changed files with 2 additions and 0 deletions

View File

@ -1282,6 +1282,7 @@ IndexResult index(WorkingFiles *wfiles, VFS *vfs, const std::string &opt_wdir, c
return {}; return {};
clang->getPreprocessorOpts().RetainRemappedFileBuffers = true; clang->getPreprocessorOpts().RetainRemappedFileBuffers = true;
#if LLVM_VERSION_MAJOR >= 22 #if LLVM_VERSION_MAJOR >= 22
clang->setVirtualFileSystem(fs);
clang->createFileManager(); clang->createFileManager();
#else #else
clang->createFileManager(fs); clang->createFileManager(fs);

View File

@ -284,6 +284,7 @@ std::unique_ptr<CompilerInstance> buildCompilerInstance(Session &session, std::u
// RequiresNullTerminator: true may cause out-of-bounds read when a file is // RequiresNullTerminator: true may cause out-of-bounds read when a file is
// mmap'ed but is saved concurrently. // mmap'ed but is saved concurrently.
#if LLVM_VERSION_MAJOR >= 22 #if LLVM_VERSION_MAJOR >= 22
clang->setVirtualFileSystem(fs);
clang->createFileManager(); clang->createFileManager();
#else #else
clang->createFileManager(fs); clang->createFileManager(fs);