diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-01-31 08:02:11 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-01-31 08:02:11 +0000 |
commit | e22df330a344ddbd536e6bcbc542290953ab4a9d (patch) | |
tree | 2cdf42b0e6cff44780f88583ab7b5185181264fa /lib/Transforms | |
parent | 82aea644c6d2a21464958fe2e3a1cd0f6bfc82db (diff) | |
download | external_llvm-e22df330a344ddbd536e6bcbc542290953ab4a9d.zip external_llvm-e22df330a344ddbd536e6bcbc542290953ab4a9d.tar.gz external_llvm-e22df330a344ddbd536e6bcbc542290953ab4a9d.tar.bz2 |
Revert r173946. This breaks compilation of googletest with Clang
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174048 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Utils/ValueMapper.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/Transforms/Utils/ValueMapper.cpp b/lib/Transforms/Utils/ValueMapper.cpp index b9e4ddf..a5e1643 100644 --- a/lib/Transforms/Utils/ValueMapper.cpp +++ b/lib/Transforms/Utils/ValueMapper.cpp @@ -63,23 +63,14 @@ Value *llvm::MapValue(const Value *V, ValueToValueMapTy &VM, RemapFlags Flags, // Check all operands to see if any need to be remapped. for (unsigned i = 0, e = MD->getNumOperands(); i != e; ++i) { Value *OP = MD->getOperand(i); - if (OP == 0) continue; - Value *Mapped_OP = MapValue(OP, VM, Flags, TypeMapper); - // If Mapped_Op is null, we should use indentity map. - if (Mapped_OP == OP || Mapped_OP == 0) continue; + if (OP == 0 || MapValue(OP, VM, Flags, TypeMapper) == OP) continue; // Ok, at least one operand needs remapping. SmallVector<Value*, 4> Elts; Elts.reserve(MD->getNumOperands()); for (i = 0; i != e; ++i) { Value *Op = MD->getOperand(i); - if (Op == 0) - Elts.push_back(0); - else { - Value *Mapped_Op = MapValue(Op, VM, Flags, TypeMapper); - // If Mapped_Op is null, we should use indentity map. - Elts.push_back(Mapped_Op ? Mapped_Op : Op); - } + Elts.push_back(Op ? MapValue(Op, VM, Flags, TypeMapper) : 0); } MDNode *NewMD = MDNode::get(V->getContext(), Elts); Dummy->replaceAllUsesWith(NewMD); |