[PATCH] D48408: [Debugify] Diagnose mis-sized dbg.values

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 26 14:59:51 PDT 2018


probinson accepted this revision.
probinson added a comment.
This revision is now accepted and ready to land.

A couple of naming suggestions but LGTM.



================
Comment at: tools/opt/Debugify.cpp:43
 
+uint64_t getSizeInBits(Module &M, Type *Ty) {
+  return Ty->isSized() ? M.getDataLayout().getTypeAllocSizeInBits(Ty) : 0;
----------------
Given the discussion about sizes, maybe getAllocSizeInBits()?


================
Comment at: tools/opt/Debugify.cpp:187
+  uint64_t ActualSizeInBits = getSizeInBits(M, Ty);
+  uint64_t ExpectedSizeInBits = *DVI->getFragmentSizeInBits();
+  bool HasBadSize = Ty->isIntegerTy()
----------------
Maybe "ValueSizeInBits" and "FragmentSizeInBits" to be more descriptive than judgmental.


https://reviews.llvm.org/D48408





More information about the llvm-commits mailing list