mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Debug Info: Assert that the main source file name is non-empty.
The Darwin linker won't process the debug info if the source file name is invalid so there is no point in having a fallback implemented there. <rdar://problem/25130236>
This commit is contained in:
@@ -384,8 +384,11 @@ IRGenModule::IRGenModule(IRGenerator &irgen,
|
||||
else
|
||||
RegisterPreservingCC = DefaultCC;
|
||||
|
||||
if (IRGen.Opts.DebugInfoKind > IRGenDebugInfoKind::None)
|
||||
DebugInfo = new IRGenDebugInfo(IRGen.Opts, *CI, *this, Module, SF);
|
||||
if (IRGen.Opts.DebugInfoKind > IRGenDebugInfoKind::None) {
|
||||
StringRef MainFile(SF ? SF->getFilename()
|
||||
: StringRef(IRGen.Opts.MainInputFilename));
|
||||
DebugInfo = new IRGenDebugInfo(IRGen.Opts, *CI, *this, Module, MainFile);
|
||||
}
|
||||
|
||||
initClangTypeConverter();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user