projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b20724d
)
Add support for UndefValue
author
Chris Lattner
<sabre@nondot.org>
Sat, 16 Oct 2004 18:10:31 +0000
(18:10 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sat, 16 Oct 2004 18:10:31 +0000
(18:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17046
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Utils/ValueMapper.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Utils/ValueMapper.cpp
b/lib/Transforms/Utils/ValueMapper.cpp
index d7507f9f07fb29ae30b7241ab2f8e883fb2db289..299a093364c5211ededc4b0bbeb52c07876f00c5 100644
(file)
--- a/
lib/Transforms/Utils/ValueMapper.cpp
+++ b/
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) {