File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,8 @@ void ReplaceableMetadataImpl::SalvageDebugInfo(const Constant &C) {
339
339
ValueAsMetadata *MD = I->second ;
340
340
using UseTy =
341
341
std::pair<void *, std::pair<MetadataTracking::OwnerTy, uint64_t >>;
342
- // Copy out uses and update value of Constant used by debug info metadata with undef below
342
+ // Copy out uses and update value of Constant used by debug info metadata with
343
+ // poison below
343
344
SmallVector<UseTy, 8 > Uses (MD->UseMap .begin (), MD->UseMap .end ());
344
345
345
346
for (const auto &Pair : Uses) {
@@ -349,7 +350,7 @@ void ReplaceableMetadataImpl::SalvageDebugInfo(const Constant &C) {
349
350
// Check for MetadataAsValue.
350
351
if (isa<MetadataAsValue *>(Owner)) {
351
352
cast<MetadataAsValue *>(Owner)->handleChangedMetadata (
352
- ValueAsMetadata::get (UndefValue ::get (C.getType ())));
353
+ ValueAsMetadata::get (PoisonValue ::get (C.getType ())));
353
354
continue ;
354
355
}
355
356
if (!isa<Metadata *>(Owner))
@@ -359,7 +360,7 @@ void ReplaceableMetadataImpl::SalvageDebugInfo(const Constant &C) {
359
360
continue ;
360
361
if (isa<DINode>(OwnerMD)) {
361
362
OwnerMD->handleChangedOperand (
362
- Pair.first , ValueAsMetadata::get (UndefValue ::get (C.getType ())));
363
+ Pair.first , ValueAsMetadata::get (PoisonValue ::get (C.getType ())));
363
364
}
364
365
}
365
366
}
Original file line number Diff line number Diff line change 1
1
; RUN: opt -S -passes=globalopt --experimental-debuginfo-iterators=false <%s | FileCheck %s
2
- ; CHECK: #dbg_value(ptr undef,
2
+ ; CHECK: #dbg_value(ptr poison,
3
3
; CHECK-SAME: [[VAR:![0-9]+]],
4
4
; CHECK-SAME: !DIExpression()
5
5
; CHECK: [[VAR]] = !DILocalVariable(name: "_format"
You can’t perform that action at this time.
0 commit comments