Skip to content

Commit

Permalink
[RemoveDIs] Enable conversion from dbg.declare to DPValue (llvm#74090)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
OCHyams authored Dec 13, 2023
1 parent 3c9236c commit bdbc2db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion llvm/lib/IR/BasicBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ void BasicBlock::convertToNewDbgValues() {
SmallVector<DPValue *, 4> DPVals;
for (Instruction &I : make_early_inc_range(InstList)) {
assert(!I.DbgMarker && "DbgMarker already set on old-format instrs?");
if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(&I)) {
if (DbgVariableIntrinsic *DVI = dyn_cast<DbgVariableIntrinsic>(&I)) {
if (isa<DbgAssignIntrinsic>(DVI))
continue;

// Convert this dbg.value to a DPValue.
DPValue *Value = new DPValue(DVI);
DPVals.push_back(Value);
Expand Down

0 comments on commit bdbc2db

Please sign in to comment.