Skip to content

Conversation

@kubamracek
Copy link
Contributor

We currently crash in IRGen when emitting metadata for an opaque type decl. We should not emit that in embedded Swift.

Assertion failed: (!isEmbedded(decl)), function forOpaqueTypeDescriptor, file Linking.h, line 928.
 #7 0x00000001083d8950 swift::irgen::IRGenModule::emitOpaqueTypeDecl(swift::OpaqueTypeDecl*) (.cold.3)
 #8 0x00000001035e5b80 swift::irgen::IRGenModule::emitOpaqueTypeDecl(swift::OpaqueTypeDecl*)
 #9 0x000000010362574c swift::irgen::IRGenModule::maybeEmitOpaqueTypeDecl(swift::OpaqueTypeDecl*)
#10 0x000000010355b0c0 swift::irgen::IRGenModule::emitSourceFile(swift::SourceFile&)
#11 0x0000000103660898 swift::IRGenRequest::evaluate(swift::Evaluator&, swift::IRGenDescriptor) const
#12 0x00000001036a69bc swift::GeneratedModule swift::SimpleRequest<swift::IRGenRequest, swift::GeneratedModule (swift::IRGenDescriptor), (swift::RequestFlags)9>::callDerived<0ul>(swift::Evaluator&, std::__1::integer_sequence<unsigned long, 0ul>) const
#13 0x0000000103668dbc llvm::Expected<swift::IRGenRequest::OutputType> swift::Evaluator::getResultUncached<swift::IRGenRequest>(swift::IRGenRequest const&)
#14 0x000000010366184c swift::performIRGeneration(swift::ModuleDecl*, swift::IRGenOptions const&, swift::TBDGenOptions const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, llvm::GlobalVariable**)
#15 0x00000001031aefa8 generateIR(swift::IRGenOptions const&, swift::TBDGenOptions const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, swift::PrimarySpecificPaths const&, llvm::StringRef, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, llvm::GlobalVariable*&, llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>)
#16 0x00000001031ab6c4 performCompileStepsPostSILGen(swift::CompilerInstance&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*)
#17 0x00000001031aadd4 swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*)
#18 0x00000001031bb10c withSemanticAnalysis(swift::CompilerInstance&, swift::FrontendObserver*, llvm::function_ref<bool (swift::CompilerInstance&)>, bool)
#19 0x00000001031ad010 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*)

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek kubamracek added the embedded Embedded Swift label Nov 18, 2023
@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek kubamracek merged commit fd63387 into swiftlang:main Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

embedded Embedded Swift

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant