diff --git a/lib/Transforms/Utils/ValueMapper.cpp b/lib/Transforms/Utils/ValueMapper.cpp index 9f525565271..94e56b73a53 100644 --- a/lib/Transforms/Utils/ValueMapper.cpp +++ b/lib/Transforms/Utils/ValueMapper.cpp @@ -33,9 +33,7 @@ Value *llvm::MapValue(const Value *V, std::map &VM) { if (isa(C) || isa(C) || isa(C) || isa(C)) return VMSlot = C; // Primitive constants map directly - else if (GlobalValue *GV = dyn_cast(C)) { - return VMSlot = GV; - } else if (ConstantArray *CA = dyn_cast(C)) { + else if (ConstantArray *CA = dyn_cast(C)) { const std::vector &Vals = CA->getValues(); for (unsigned i = 0, e = Vals.size(); i != e; ++i) { Value *MV = MapValue(Vals[i], VM);