[PATCH] D27642: DebugInfo: Added support for Checksum debug info feature (LLVM IR part)

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 17:41:46 PST 2016


mehdi_amini added a comment.

I think we try to make as much as possible metadata to be "distinct", CC Duncan to advise.



================
Comment at: docs/LangRef.rst:4018
+                     data: "000102030405060708090a0b0c0d0e0f")
+
 .. _DIBasicType:
----------------
What are the valid list of "type"? What type is the "type" field? Why the prefix `ChecksumType_` and not just `MD5`?
Why not a simpler approach where the type is an MDString? (That already how you parse it in DIChecksum::getChecksumType anyway)


================
Comment at: include/llvm/IR/DebugInfoMetadata.h:430
   inline StringRef getDirectory() const;
+  inline DIChecksum *getChecksum() const;
 
----------------
Why there? Where is this API used?



================
Comment at: include/llvm/IR/DebugInfoMetadata.h:491
+                             bool ShouldCreate = true) {
+    // Do not create checksum with "None" checksum type.
+    if (Type == None)
----------------
What is the reason to have the "None"?


================
Comment at: include/llvm/IR/DebugInfoMetadata.h:1331
   StringRef getDirectory() const { return getScope()->getDirectory(); }
+  //DIChecksum *getChecksum() const { return getScope()->getChecksum(); }
 
----------------
Intended?


https://reviews.llvm.org/D27642





More information about the llvm-commits mailing list