Skip to content

Commit 4648acb

Browse files
authored
[NFC][RemoveDIs] Add LocationType parameter to DPValue ctor (#74091)
We can tidy up the interfaces a bit once all intrinsics are supported, as we will have a more informed view then.
1 parent dc2ce60 commit 4648acb

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

llvm/include/llvm/IR/DebugProgramInstruction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class DPValue : public ilist_node<DPValue>, private DebugValueUser {
113113
/// Directly construct a new DPValue representing a dbg.value intrinsic
114114
/// assigning \p Location to the DV / Expr / DI variable.
115115
DPValue(Metadata *Location, DILocalVariable *DV, DIExpression *Expr,
116-
const DILocation *DI);
116+
const DILocation *DI, LocationType Type = LocationType::Value);
117117

118118
/// Iterator for ValueAsMetadata that internally uses direct pointer iteration
119119
/// over either a ValueAsMetadata* or a ValueAsMetadata**, dereferencing to the

llvm/lib/IR/DebugProgramInstruction.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ DPValue::DPValue(const DPValue &DPV)
3535
DbgLoc(DPV.getDebugLoc()), Type(DPV.getType()) {}
3636

3737
DPValue::DPValue(Metadata *Location, DILocalVariable *DV, DIExpression *Expr,
38-
const DILocation *DI)
38+
const DILocation *DI, LocationType Type)
3939
: DebugValueUser(Location), Variable(DV), Expression(Expr), DbgLoc(DI),
40-
Type(LocationType::Value) {
41-
}
40+
Type(Type) {}
4241

4342
void DPValue::deleteInstr() { delete this; }
4443

0 commit comments

Comments
 (0)