diff options
author | Chuanqi Xu <chuanqi.xcq@alibaba-inc.com> | 2025-03-28 11:12:00 +0800 |
---|---|---|
committer | Chuanqi Xu <yedeng.yd@linux.alibaba.com> | 2025-06-26 13:39:45 +0800 |
commit | a6e524276e2c0596162a9635e0aa87a5ba145409 (patch) | |
tree | c3177314fb79cdde5ecb44465249ebd17c70c2ab /clang/lib/Serialization | |
parent | ce8f1600d042726312b80ff7e80b26cd03e99c8f (diff) | |
download | llvm-a6e524276e2c0596162a9635e0aa87a5ba145409.zip llvm-a6e524276e2c0596162a9635e0aa87a5ba145409.tar.gz llvm-a6e524276e2c0596162a9635e0aa87a5ba145409.tar.bz2 |
[Modules] Add merged Files to UsedModuleFiles
This is needed by no casacading chanegs feature. A BMI of a module
interface needs to merge the hash value of all the module files that
the users can touched actually.
Diffstat (limited to 'clang/lib/Serialization')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 04cbd1ca..06cd6c7 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -4062,6 +4062,10 @@ void ASTWriter::handleVTable(CXXRecordDecl *RD) { PendingEmittingVTables.push_back(RD); } +void ASTWriter::addTouchedModuleFile(serialization::ModuleFile *MF) { + TouchedModuleFiles.insert(MF); +} + //===----------------------------------------------------------------------===// // DeclContext's Name Lookup Table Serialization //===----------------------------------------------------------------------===// @@ -4106,7 +4110,7 @@ public: "have reference to loaded module file but no chain?"); using namespace llvm::support; - + Writer.addTouchedModuleFile(F); endian::write<uint32_t>(Out, Writer.getChain()->getModuleFileID(F), llvm::endianness::little); } @@ -4473,6 +4477,7 @@ public: "have reference to loaded module file but no chain?"); using namespace llvm::support; + Writer.addTouchedModuleFile(F); endian::write<uint32_t>(Out, Writer.getChain()->getModuleFileID(F), llvm::endianness::little); } |