r322413 - [DWARFv5] Have -gdwarf-5 generate MD5 checksums

Paul Robinson via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 12 14:19:03 PST 2018


Author: probinson
Date: Fri Jan 12 14:19:03 2018
New Revision: 322413

URL: http://llvm.org/viewvc/llvm-project?rev=322413&view=rev
Log:
[DWARFv5] Have -gdwarf-5 generate MD5 checksums

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

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
    cfe/trunk/test/CodeGen/debug-info-file-checksum.c

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=322413&r1=322412&r2=322413&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri Jan 12 14:19:03 2018
@@ -365,7 +365,8 @@ llvm::DIFile::ChecksumKind
 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();

Modified: cfe/trunk/test/CodeGen/debug-info-file-checksum.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-file-checksum.c?rev=322413&r1=322412&r2=322413&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-file-checksum.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-file-checksum.c Fri Jan 12 14:19:03 2018
@@ -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 -gdwarf-5 -x c %S/Inputs/debug-info-file-checksum.c -o - | FileCheck %s
 
 // Check that "checksum" is created correctly for the compiled file.
 




More information about the cfe-commits mailing list