Index: COFF/MinGW.cpp =================================================================== --- COFF/MinGW.cpp +++ COFF/MinGW.cpp @@ -93,6 +93,8 @@ return false; if (ExcludeSymbols.count(Sym->getName())) return false; + if (!Sym->getFile()) + return false; StringRef LibName = sys::path::filename(Sym->getFile()->ParentName); // Drop the file extension. LibName = LibName.substr(0, LibName.rfind('.'));