Skip to content

Commit bdbc2db

Browse files
authored
[RemoveDIs] Enable conversion from dbg.declare to DPValue (llvm#74090)
Note that all the patches that implement support for declare-style DPValues have tests that are "rotten green" test without this patch (i.e., they pass at the moment without testing what we want them to test). See the Pull Request for more detail on this.
1 parent 3c9236c commit bdbc2db

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/IR/BasicBlock.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ void BasicBlock::convertToNewDbgValues() {
7373
SmallVector<DPValue *, 4> DPVals;
7474
for (Instruction &I : make_early_inc_range(InstList)) {
7575
assert(!I.DbgMarker && "DbgMarker already set on old-format instrs?");
76-
if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(&I)) {
76+
if (DbgVariableIntrinsic *DVI = dyn_cast<DbgVariableIntrinsic>(&I)) {
77+
if (isa<DbgAssignIntrinsic>(DVI))
78+
continue;
79+
7780
// Convert this dbg.value to a DPValue.
7881
DPValue *Value = new DPValue(DVI);
7982
DPVals.push_back(Value);

0 commit comments

Comments
 (0)