Add support for undef and unreachable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17041 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2004-10-16 18:08:06 +00:00
parent b9f18592a6
commit b976e66816
5 changed files with 15 additions and 2 deletions

View File

@@ -310,7 +310,7 @@ static Value *RemapOperand(const Value *In,
Operands[i] =
cast<Constant>(RemapOperand(CPS->getOperand(i), LocalMap, GlobalMap));
Result = ConstantStruct::get(cast<StructType>(CPS->getType()), Operands);
} else if (isa<ConstantPointerNull>(CPV)) {
} else if (isa<ConstantPointerNull>(CPV) || isa<UndefValue>(CPV)) {
Result = const_cast<Constant*>(CPV);
} else if (isa<GlobalValue>(CPV)) {
Result = cast<Constant>(RemapOperand(CPV, LocalMap, GlobalMap));