Since upgrading to Swift 5.2 with Xcode 11.4, I’m having a strange compile error:
Command failed due to signal: Abort trap: 6
conflicting debug info for argument
call void @llvm.dbg.value(metadata %objc_object* %0, metadata !7313, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64)), !dbg !7314
!7263 = !DILocalVariable(name: "aChildCoordinator", arg: 1, scope: !7261, file: !13, line: 47, type: !403)
!7313 = !DILocalVariable(name: "aChildCoordinator", arg: 1, scope: !7257, file: !13, line: 47, type: !403)
conflicting debug info for argument
call void @llvm.dbg.value(metadata %T10WhiteLabel19RegistryCoordinatorC* %1, metadata !7315, metadata !DIExpression()), !dbg !7316
!7265 = !DILocalVariable(name: "self", arg: 2, scope: !7261, file: !13, line: 47, type: !1703, flags: DIFlagArtificial)
!7315 = !DILocalVariable(name: "self", arg: 2, scope: !7257, file: !13, line: 47, type: !1703, flags: DIFlagArtificial)
<unknown>:0: error: fatal error encountered during compilation; please file a bug report with your project and the crash log
<unknown>:0: note: Broken module found, compilation aborted!
0 swift 0x000000010f86a4ea PrintStackTraceSignalHandler(void*) + 42
1 swift 0x000000010f869cc0 SignalHandler(int) + 352
2 libsystem_platform.dylib 0x00007fff6d5555fd _sigtramp + 29
3 libsystem_platform.dylib 0x000000011f40bacb _sigtramp + 2984994027
4 libsystem_c.dylib 0x00007fff6d42b808 abort + 120
5 swift 0x000000010b5befc1 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*)::$_1::__invoke(void*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) + 1137
6 swift 0x000000010f7e55c6 llvm::report_fatal_error(llvm::Twine const&, bool) + 278
7 swift 0x000000010f7e54ab llvm::report_fatal_error(char const*, bool) + 43
8 swift 0x000000010f76739c (anonymous namespace)::VerifierLegacyPass::doFinalization(llvm::Module&) + 204
9 swift 0x000000010f706b73 llvm::FPPassManager::doFinalization(llvm::Module&) + 51
10 swift 0x000000010f70dcf2 llvm::legacy::FunctionPassManagerImpl::doFinalization(llvm::Module&) + 82
11 swift 0x000000010b7cacbf swift::performLLVM(swift::IRGenOptions&, swift::DiagnosticEngine*, llvm::sys::SmartMutex<false>*, llvm::GlobalVariable*, llvm::Module*, llvm::TargetMachine*, swift::version::Version const&, llvm::StringRef, swift::UnifiedStatsReporter*) + 5919
12 swift 0x000000010b7cfa50 (anonymous namespace)::LLVMCodeGenThreads::Thread::run() + 208
13 swift 0x000000010b7cf8f9 (anonymous namespace)::LLVMCodeGenThreads::runThread(void*) + 9
14 libsystem_pthread.dylib 0x00007fff6d561109 _pthread_start + 148
15 libsystem_pthread.dylib 0x00007fff6d55cb8b thread_start + 15
I’m sort of a loss to even know where to begin to debug this. The searching I’ve done hasn’t really pointed me anywhere that makes sense with my code base (mostly C++ solutions).
I’ve located the piece of code that’s causing the error (a protocol extension), but any minor change I make doesn’t resolve it (renaming variable and arguments, etc…). This is in a pretty large codebase and I haven’t been able to reduce the error into a small piece of code. Any pointers where I can start to look into addressing this?