diff --git a/lib/Transforms/Utils/ValueMapper.cpp b/lib/Transforms/Utils/ValueMapper.cpp index 6db9ed55de2..f1724db1d47 100644 --- a/lib/Transforms/Utils/ValueMapper.cpp +++ b/lib/Transforms/Utils/ValueMapper.cpp @@ -24,7 +24,7 @@ Value *llvm::MapValue(const Value *V, std::map &VM) { // Global values do not need to be seeded into the ValueMap if they are using // the identity mapping. - if (isa(V)) + if (isa(V) || isa(V)) return VMSlot = const_cast(V); if (Constant *C = const_cast(dyn_cast(V))) {