diff options
Diffstat (limited to 'llvm/lib/MC/MCCodeView.cpp')
-rw-r--r-- | llvm/lib/MC/MCCodeView.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCCodeView.cpp b/llvm/lib/MC/MCCodeView.cpp index 8ae0187237a..2d8ef442f75 100644 --- a/llvm/lib/MC/MCCodeView.cpp +++ b/llvm/lib/MC/MCCodeView.cpp @@ -118,6 +118,11 @@ void CodeViewContext::emitStringTable(MCObjectStreamer &OS) { } void CodeViewContext::emitFileChecksums(MCObjectStreamer &OS) { + // Do nothing if there are no file checksums. Microsoft's linker rejects empty + // CodeView substreams. + if (Filenames.empty()) + return; + MCContext &Ctx = OS.getContext(); MCSymbol *FileBegin = Ctx.createTempSymbol("filechecksums_begin", false), *FileEnd = Ctx.createTempSymbol("filechecksums_end", false); |