[PATCH] D48024: [DebugInfo] Check size of variable in ConvertDebugDeclareToDebugValue
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 12 09:12:31 PDT 2018
aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.
Few more small nitpicks inline but otherwise LGTM.
================
Comment at: include/llvm/IR/IntrinsicInst.h:96
+ /// Get the size (in bits) of the variable, or fragment of the variable,
+ /// that is described.
----------------
I think the last comma is not necessary in this sentence.
================
Comment at: lib/IR/IntrinsicInst.cpp:54
+ if (auto Fragment = getExpression()->getFragmentInfo())
+ return Fragment->SizeInBits;
+ if (auto VarSize = getVariable()->getSizeInBits())
----------------
Why not just
`return getVariable()->getSizeInBits()` ?
================
Comment at: lib/Transforms/Utils/Local.cpp:1258
+ // know which part) we insert an dbg.value instrinsic to indicate that we
+ // know nothing about the variables content.
+ DV = UndefValue::get(DV->getType());
----------------
variable's
Repository:
rL LLVM
https://reviews.llvm.org/D48024
More information about the llvm-commits
mailing list