diff options
author | Michael Spencer <bigcheesegs@gmail.com> | 2025-02-24 11:18:21 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-24 11:18:21 -0800 |
commit | be5c66d97d7977bd9fa31b1a0e78196ecbb6e52b (patch) | |
tree | 2545b912345f62d77494d803b3be9340794c5a00 /clang/lib/Serialization/ModuleManager.cpp | |
parent | 4ac43b541c067e6b888948900d01521e58a00eca (diff) | |
download | llvm-be5c66d97d7977bd9fa31b1a0e78196ecbb6e52b.zip llvm-be5c66d97d7977bd9fa31b1a0e78196ecbb6e52b.tar.gz llvm-be5c66d97d7977bd9fa31b1a0e78196ecbb6e52b.tar.bz2 |
[clang] Improve module out of date error message (#128103)
When a pcm file has a different size or modification time than it had
when it was written to another module's IMPORT table Clang emits:
`<pcm> is out of date and needs to be rebuilt: module file out of date`
This is difficult to understand what's happening because there are a lot
of reasons that a module file can be out of date. This changes the
latter part of that message to:
`module file has a different size or mtime than expected`
Which makes it clearer what the issue is. For future work it would be
nice if a more detailed explanation of the issue could be emitted as a
note instead.
Diffstat (limited to 'clang/lib/Serialization/ModuleManager.cpp')
-rw-r--r-- | clang/lib/Serialization/ModuleManager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ModuleManager.cpp b/clang/lib/Serialization/ModuleManager.cpp index ba78c9e..4ecb776 100644 --- a/clang/lib/Serialization/ModuleManager.cpp +++ b/clang/lib/Serialization/ModuleManager.cpp @@ -119,7 +119,7 @@ ModuleManager::addModule(StringRef FileName, ModuleKind Type, // Note: ExpectedSize and ExpectedModTime will be 0 for MK_ImplicitModule // when using an ASTFileSignature. if (lookupModuleFile(FileName, ExpectedSize, ExpectedModTime, Entry)) { - ErrorStr = "module file out of date"; + ErrorStr = "module file has a different size or mtime than expected"; return OutOfDate; } |