Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/Utils/ValueMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions llvm/unittests/Transforms/Utils/ValueMapperTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ TEST(ValueMapperTest, mapValueLocalInArgList) {
// such as "metadata i32 %x" don't currently successfully maintain that
// property. To keep RemapInstruction from crashing we need a non-null
// return here, but we also shouldn't reference the unmapped local. Use
// undef for uses in a DIArgList.
auto *N0 = UndefValue::get(Type::getInt8Ty(C));
// poison for uses in a DIArgList.
auto *N0 = PoisonValue::get(Type::getInt8Ty(C));
auto *N0AM = ValueAsMetadata::get(N0);
std::vector<ValueAsMetadata*> N0Elts;
N0Elts.push_back(N0AM);
Expand Down
Loading