diff options
author | Chris Lattner <sabre@nondot.org> | 2004-10-16 18:08:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-10-16 18:08:06 +0000 |
commit | b976e668165e1875a8f1eb7af800e33bb1e4393d (patch) | |
tree | fea6726be7a279c0937865e0ca36976d7f9f3052 /lib/VMCore/Linker.cpp | |
parent | b9f18592a62b5f60d20ee6d498df0086b1813b21 (diff) | |
download | external_llvm-b976e668165e1875a8f1eb7af800e33bb1e4393d.zip external_llvm-b976e668165e1875a8f1eb7af800e33bb1e4393d.tar.gz external_llvm-b976e668165e1875a8f1eb7af800e33bb1e4393d.tar.bz2 |
Add support for undef and unreachable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17041 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Linker.cpp')
-rw-r--r-- | lib/VMCore/Linker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Linker.cpp b/lib/VMCore/Linker.cpp index 70bd22c..fbf0978 100644 --- a/lib/VMCore/Linker.cpp +++ b/lib/VMCore/Linker.cpp @@ -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)); |