[PATCH] D74052: [DebugInfo] Tidy up DbgValueLocation class
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 5 09:27:44 PST 2020
Orlando marked 3 inline comments as done.
Orlando 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; }
----------------
aprantl wrote:
> getLocNo()?
I have done this in D74055, another NFC which is dependant on the functional change, to keep this diff smaller because it touches each of the locNo() call sites to update the variable names.
================
Comment at: llvm/lib/CodeGen/LiveDebugVariables.cpp:108
DbgValueLocation changeLocNo(unsigned NewLocNo) const {
return DbgValueLocation(NewLocNo);
----------------
aprantl wrote:
> Without having read the context, this function seems pointless and redundant with the constructor?
This becomes useful in the next patch D74053 (the functional change).
================
Comment at: llvm/lib/CodeGen/LiveDebugVariables.cpp:123
private:
- unsigned LocNo;
+ unsigned LocNo = 0u;
};
----------------
aprantl wrote:
> why `u`?
No particular reason, I am happy to remove it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74052/new/
https://reviews.llvm.org/D74052
More information about the llvm-commits
mailing list