llvm-project/clang/lib
Duncan P. N. Exon Smith 83dcb34b6b clang/Modules: Error if ReadASTBlock does not find the main module
If ReadASTBlock does not find its top-level submodule, there's something
wrong the with the PCM.  Error in that case, to avoid hitting problems
further from the source.

Note that the Swift compiler sometimes hits a case in
CompilerInstance::loadModule where the top-level submodule mysteriously
does not have Module::IsFromModuleFile set.  That will emit a confusing
warn_missing_submodule, which was never intended for the main module.
The recent audit of error-handling in ReadAST may have rooted out the
real problem.  If not, this commit will help to clarify the real
problem, and replace a confusing warning with an error pointing at the
malformed PCM file.

We're specifically sniffing out whether the top-level submodule was
found/processed, in case there is a malformed module file that is
missing it.  If there is an error encountered during ReadSubmoduleBlock
the return status should already propagate through.  It would be nice to
detect other missing submodules around here to catch other instances of
warn_missing_submodule closer to the source, but that's left as a future
exercise.

https://reviews.llvm.org/D70063
2019-11-12 08:40:53 -08:00
..
ARCMigrate Removed some questionable default arguments from setters 2019-09-12 12:16:43 +00:00
AST Revert "Reapply "Fix crash on switch conditions of non-integer types in templates"" 2019-11-08 14:18:15 -08:00
ASTMatchers [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Analysis Redeclare Objective-C property accessors inside the ObjCImplDecl in which they are synthesized. 2019-11-08 08:23:22 -08:00
Basic AArch64: add arm64_32 support to Clang. 2019-11-12 12:45:18 +00:00
CodeGen AArch64: add arm64_32 support to Clang. 2019-11-12 12:45:18 +00:00
CrossTU [CrossTU] Fix problem with CrossTU AST load limit and progress messages. 2019-08-12 07:15:29 +00:00
DirectoryWatcher [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Driver AArch64: add arm64_32 support to Clang. 2019-11-12 12:45:18 +00:00
Edit [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast 2019-07-02 18:28:13 +00:00
Format [clang-format] [PR36294] AlwaysBreakAfterReturnType works incorrectly for some operator functions 2019-11-12 09:25:00 +00:00
Frontend [clang][IFS] Adds support for more decl types in clang interface stubs. 2019-11-08 20:27:25 -05:00
FrontendTool [analyzer] Don't run the analyzer for -analyzer-list-enabled-checkers 2019-09-12 18:53:48 +00:00
Headers [PowerPC][Altivec] Fix offsets for vec_xl and vec_xst 2019-11-07 20:58:11 -06:00
Index Redeclare Objective-C property accessors inside the ObjCImplDecl in which they are synthesized. 2019-11-08 08:23:22 -08:00
Lex [ms] Fix Microsoft compatibility handling of commas in nested macro expansions. 2019-11-04 12:49:19 -05:00
Parse [OPENMP50]Generalize handling of context matching/scoring. 2019-11-11 14:41:10 -05:00
Rewrite [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug 2019-08-15 21:17:48 +00:00
Sema AArch64: add arm64_32 support to Clang. 2019-11-12 12:45:18 +00:00
Serialization clang/Modules: Error if ReadASTBlock does not find the main module 2019-11-12 08:40:53 -08:00
StaticAnalyzer [analyzer] Fix skipping the call during inlined defensive check suppression. 2019-11-08 18:27:14 -08:00
Tooling [libTooling] Further simplify `Stencil` type and introduce `MatchComputation`. 2019-11-11 12:44:15 -05:00
CMakeLists.txt Reland [clang] DirectoryWatcher 2019-07-12 20:34:10 +00:00