[PATCH] D43043: [DebugInfo] Unify ChecksumKind and Checksum value in DIFile
    Adrian Prantl via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Feb  9 08:40:26 PST 2018
    
    
  
aprantl added inline comments.
================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:1555
+  if (N->getRawChecksum()) {
+    Record.push_back(N->getRawChecksum()->Kind);
+    Record.push_back(VE.getMetadataOrNullID(N->getRawChecksum()->Value));
----------------
The comment in MetadataLoader claims that the None kind uses 0 as a representation.  Why is this condition necessary?
================
Comment at: test/Bitcode/upgrade-dbg-checksum.ll:16
+; Function Attrs: noinline nounwind optnone uwtable
+define i32 @f() #0 !dbg !15 {
+  ret i32 42, !dbg !18
----------------
I don't think you need a function or a global at all. An empty module with just two DICompileUnits should be sufficient.
https://reviews.llvm.org/D43043
    
    
More information about the llvm-commits
mailing list