diff options
author | Chris Lattner <sabre@nondot.org> | 2004-10-16 18:10:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-10-16 18:10:31 +0000 |
commit | 7e6d4a12b510b32a4ac98aaf296ef73d70d7d306 (patch) | |
tree | a5bb22156c89eb0c0bbd9e76f876a0105775aeea /llvm/lib/Transforms/Utils/ValueMapper.cpp | |
parent | c0e2e8247796e58c729033db28ed9dd25c1a0282 (diff) | |
download | bcm5719-llvm-7e6d4a12b510b32a4ac98aaf296ef73d70d7d306.tar.gz bcm5719-llvm-7e6d4a12b510b32a4ac98aaf296ef73d70d7d306.zip |
Add support for UndefValue
llvm-svn: 17046
Diffstat (limited to 'llvm/lib/Transforms/Utils/ValueMapper.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/ValueMapper.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp index d7507f9f07f..299a093364c 100644 --- a/llvm/lib/Transforms/Utils/ValueMapper.cpp +++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp @@ -31,7 +31,8 @@ Value *llvm::MapValue(const Value *V, std::map<const Value*, Value*> &VM) { if (Constant *C = const_cast<Constant*>(dyn_cast<Constant>(V))) { if (isa<ConstantIntegral>(C) || isa<ConstantFP>(C) || - isa<ConstantPointerNull>(C) || isa<ConstantAggregateZero>(C)) + isa<ConstantPointerNull>(C) || isa<ConstantAggregateZero>(C) || + isa<UndefValue>(C)) return VMSlot = C; // Primitive constants map directly else if (ConstantArray *CA = dyn_cast<ConstantArray>(C)) { for (unsigned i = 0, e = CA->getNumOperands(); i != e; ++i) { |