diff options
author | Pedro Lobo <pedro.lobo@tecnico.ulisboa.pt> | 2025-01-13 21:38:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-13 21:38:40 +0000 |
commit | 7e191038957cf5e22da55ba577ce6e033236b05f (patch) | |
tree | 503bc2a9d5b6e45a056d0ee50e69f1a939c57d85 /llvm/lib/Transforms/Utils/ValueMapper.cpp | |
parent | 1907a29dedfb9625772a332bb6d6c31d89fb36d3 (diff) | |
download | llvm-7e191038957cf5e22da55ba577ce6e033236b05f.zip llvm-7e191038957cf5e22da55ba577ce6e033236b05f.tar.gz llvm-7e191038957cf5e22da55ba577ce6e033236b05f.tar.bz2 |
[DebugInfo] Map VAM args to `poison` instead of `undef` [NFC] (#122756)
If an argument cannot be mapped in `Mapper::mapValue`, it can be mapped
to `poison` instead of `undef`.
Diffstat (limited to 'llvm/lib/Transforms/Utils/ValueMapper.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/ValueMapper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp index 3faea48..0b57c3b 100644 --- a/llvm/lib/Transforms/Utils/ValueMapper.cpp +++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp @@ -410,9 +410,9 @@ Value *Mapper::mapValue(const Value *V) { } else if ((Flags & RF_IgnoreMissingLocals) && isa<LocalAsMetadata>(VAM)) { MappedArgs.push_back(VAM); } else { - // If we cannot map the value, set the argument as undef. + // If we cannot map the value, set the argument as poison. MappedArgs.push_back(ValueAsMetadata::get( - UndefValue::get(VAM->getValue()->getType()))); + PoisonValue::get(VAM->getValue()->getType()))); } } return MetadataAsValue::get(V->getContext(), |