[PATCH] D74052: [DebugInfo] Tidy up DbgValueLocation class
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 5 08:49:56 PST 2020
aprantl added inline comments.
================
Comment at: llvm/lib/CodeGen/LiveDebugVariables.cpp:105
- unsigned locNo() const {
- // Fix up the undef location number, which gets truncated.
- return LocNo == INT_MAX ? UndefLocNo : LocNo;
- }
+ unsigned locNo() const { return LocNo; }
bool isUndef() const { return locNo() == UndefLocNo; }
----------------
getLocNo()?
================
Comment at: llvm/lib/CodeGen/LiveDebugVariables.cpp:108
DbgValueLocation changeLocNo(unsigned NewLocNo) const {
return DbgValueLocation(NewLocNo);
----------------
Without having read the context, this function seems pointless and redundant with the constructor?
================
Comment at: llvm/lib/CodeGen/LiveDebugVariables.cpp:123
private:
- unsigned LocNo;
+ unsigned LocNo = 0u;
};
----------------
why `u`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74052/new/
https://reviews.llvm.org/D74052
More information about the llvm-commits
mailing list