diff options
| author | Orlando Cazalet-Hyams <orlando.hyams@sony.com> | 2023-12-13 11:20:53 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-13 11:20:53 +0000 |
| commit | bdbc2db5360e043c7e32cabeaa230cf91f5e51e2 (patch) | |
| tree | 17f4eaed93a8dfe15105f943b7814c2bd37e4d93 /llvm/lib/IR/BasicBlock.cpp | |
| parent | 3c9236c0bf57a3a7689fc64c57c1325ea466b1c0 (diff) | |
[RemoveDIs] Enable conversion from dbg.declare to DPValue (#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.
Diffstat (limited to 'llvm/lib/IR/BasicBlock.cpp')
| -rw-r--r-- | llvm/lib/IR/BasicBlock.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp index f364c56a42c5..8e776744f22d 100644 --- a/llvm/lib/IR/BasicBlock.cpp +++ b/llvm/lib/IR/BasicBlock.cpp @@ -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); |
