[lld] fc011b5 - [lld-macho] Replace debug-info-related assert with FIXME

Jez Ng via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 5 14:24:39 PST 2021


Author: Jez Ng
Date: 2021-03-05T17:24:31-05:00
New Revision: fc011b5eb1a3e3837855149c57ae9c8acc709a0a

URL: https://github.com/llvm/llvm-project/commit/fc011b5eb1a3e3837855149c57ae9c8acc709a0a
DIFF: https://github.com/llvm/llvm-project/commit/fc011b5eb1a3e3837855149c57ae9c8acc709a0a.diff

LOG: [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

Added: 
    

Modified: 
    lld/MachO/InputFiles.cpp

Removed: 
    


################################################################################
diff  --git a/lld/MachO/InputFiles.cpp b/lld/MachO/InputFiles.cpp
index 6dd211a29e8a..ed3e73e201c6 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.


        


More information about the llvm-commits mailing list