Differential Revision: https://reviews.llvm.org/D42011
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322413
91177308-0d34-0410-b5e6-
96231b3b80d8
CGDebugInfo::computeChecksum(FileID FID, SmallString<32> &Checksum) const {
Checksum.clear();
- if (!CGM.getCodeGenOpts().EmitCodeView)
+ if (!CGM.getCodeGenOpts().EmitCodeView &&
+ CGM.getCodeGenOpts().DwarfVersion < 5)
return llvm::DIFile::CSK_None;
SourceManager &SM = CGM.getContext().getSourceManager();
// 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.