Commit 8c58a77
committed
[cxx-interop] Fix AST serialization error
Do not attempt to serialize C++ builtin decls. This caused an assertion failure in `clang::ASTWriter::getDeclID` when building SwiftCompilerSources:
```
Assertion failed: (DeclIDs.find(D) != DeclIDs.end() && "Declaration not emitted!"), function getDeclID, file ASTWriter.cpp, line 5272.
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.
Stack dump:
0. <eof> parser at end of file
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 swift-frontend 0x00000001123e21c7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
1 swift-frontend 0x00000001123e10e8 llvm::sys::RunSignalHandlers() + 248
2 swift-frontend 0x00000001123e2810 SignalHandler(int) + 288
3 libsystem_platform.dylib 0x00007fff204a0d7d _sigtramp + 29
4 libsystem_platform.dylib 0x0000000000000008 _sigtramp + 18446603339974439592
5 libsystem_c.dylib 0x00007fff203b0406 abort + 125
6 libsystem_c.dylib 0x00007fff203af7d8 err + 0
7 swift-frontend 0x000000011345b983 clang::ASTWriter::getDeclID(clang::Decl const*) (.cold.1) + 35
8 swift-frontend 0x0000000110a584b2 clang::ASTWriter::getDeclID(clang::Decl const*) + 322
9 swift-frontend 0x000000010e36649c llvm::OnDiskChainedHashTableGenerator<(anonymous namespace)::BaseNameToEntitiesTableWriterInfo>::Emit(llvm::raw_ostream&, (anonymous namespace)::BaseNameToEntitiesTableWriterInfo&) + 1244
10 swift-frontend 0x000000010e364927 swift::SwiftLookupTableWriter::writeExtensionContents(clang::Sema&, llvm::BitstreamWriter&) + 1351
11 swift-frontend 0x0000000110a59b62 clang::ASTWriter::WriteModuleFileExtension(clang::Sema&, clang::ModuleFileExtensionWriter&) + 946
```1 parent 2472dfc commit 8c58a77
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2629 | 2629 | | |
2630 | 2630 | | |
2631 | 2631 | | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
2632 | 2636 | | |
2633 | 2637 | | |
2634 | 2638 | | |
| |||
0 commit comments