[lld-macho] Replace debug-info-related assert with FIXME
authorJez Ng <jezng@fb.com>
Fri, 5 Mar 2021 22:22:56 +0000 (17:22 -0500)
committerJez Ng <jezng@fb.com>
Fri, 5 Mar 2021 22:24:31 +0000 (17:24 -0500)
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

index 6dd211a..ed3e73e 100644 (file)
@@ -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.