summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/ValueMapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/ValueMapper.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/ValueMapper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp
index 0a63c1d5153..00a8984845d 100644
--- a/llvm/lib/Transforms/Utils/ValueMapper.cpp
+++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp
@@ -41,9 +41,9 @@ Value *llvm::MapValue(const Value *V, ValueToValueMapTy &VM, RemapFlags Flags,
if (Value *NewV =
Materializer->materializeDeclFor(const_cast<Value *>(V))) {
VM[V] = NewV;
- if (auto *GV = dyn_cast<GlobalValue>(V))
- Materializer->materializeInitFor(cast<GlobalValue>(NewV),
- const_cast<GlobalValue *>(GV));
+ if (auto *NewGV = dyn_cast<GlobalValue>(NewV))
+ Materializer->materializeInitFor(
+ NewGV, const_cast<GlobalValue *>(cast<GlobalValue>(V)));
return NewV;
}
}
OpenPOWER on IntegriCloud