================
@@ -246,6 +246,9 @@ llvm::StringRef 
SymbolFileDWARFDebugMap::GetPluginDescriptionStatic() {
 }
 
 SymbolFile *SymbolFileDWARFDebugMap::CreateInstance(ObjectFileSP objfile_sp) {
+  // Don't create a debug map if the object file isn't a Mach-O.
+  if (!objfile_sp->GetArchitecture().GetTriple().isAppleMachO())
----------------
JDevlieghere wrote:

I was worried about unconditionally dereferencing `objfile_sp`, but it looks 
like this should always be called with a valid pointer. We could add an 
`assert` but I don't see any other places where we do this (although they 
usually just forward to the ctor).

https://github.com/llvm/llvm-project/pull/139170
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to