From fc011b5eb1a3e3837855149c57ae9c8acc709a0a Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Fri, 5 Mar 2021 17:22:56 -0500 Subject: [PATCH] [lld-macho] Replace debug-info-related assert with FIXME We'll need to properly handle object files with multiple source inputs eventually, but remove the assert for now so we can successfully emit binaries for testing. Reviewed By: #lld-macho, smeenai Differential Revision: https://reviews.llvm.org/D98067 --- lld/MachO/InputFiles.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lld/MachO/InputFiles.cpp b/lld/MachO/InputFiles.cpp index 6dd211a..ed3e73e 100644 --- a/lld/MachO/InputFiles.cpp +++ b/lld/MachO/InputFiles.cpp @@ -544,9 +544,10 @@ void ObjFile::parseDebugInfo() { // TODO: Since object files can contain a lot of DWARF info, we should verify // that we are parsing just the info we need const DWARFContext::compile_unit_range &units = ctx->compile_units(); + // FIXME: There can be more than one compile unit per object file. See + // PR48637. auto it = units.begin(); compileUnit = it->get(); - assert(std::next(it) == units.end()); } // The path can point to either a dylib or a .tbd file. -- 2.7.4