[DWARFv5] Have -gdwarf-5 generate MD5 checksums

Differential Revision: https://reviews.llvm.org/D42011

llvm-svn: 322413
This commit is contained in:
Paul Robinson 2018-01-12 22:19:03 +00:00
parent f61910d8f6
commit 212f3b91ee
2 changed files with 3 additions and 1 deletions

View File

@ -365,7 +365,8 @@ llvm::DIFile::ChecksumKind
CGDebugInfo::computeChecksum(FileID FID, SmallString<32> &Checksum) const { CGDebugInfo::computeChecksum(FileID FID, SmallString<32> &Checksum) const {
Checksum.clear(); Checksum.clear();
if (!CGM.getCodeGenOpts().EmitCodeView) if (!CGM.getCodeGenOpts().EmitCodeView &&
CGM.getCodeGenOpts().DwarfVersion < 5)
return llvm::DIFile::CSK_None; return llvm::DIFile::CSK_None;
SourceManager &SM = CGM.getContext().getSourceManager(); SourceManager &SM = CGM.getContext().getSourceManager();

View File

@ -1,4 +1,5 @@
// RUN: %clang -emit-llvm -S -g -gcodeview -x c %S/Inputs/debug-info-file-checksum.c -o - | FileCheck %s // RUN: %clang -emit-llvm -S -g -gcodeview -x c %S/Inputs/debug-info-file-checksum.c -o - | FileCheck %s
// RUN: %clang -emit-llvm -S -gdwarf-5 -x c %S/Inputs/debug-info-file-checksum.c -o - | FileCheck %s
// Check that "checksum" is created correctly for the compiled file. // Check that "checksum" is created correctly for the compiled file.