[RS4GC] Remove unnecessary const_cast; NFC
authorSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 29 Jan 2016 16:54:49 +0000 (16:54 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 29 Jan 2016 16:54:49 +0000 (16:54 +0000)
GCRelocateInst::getDerivedPtr already returns a non-const llvm::Value
pointer.

llvm-svn: 259209

llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

index cc89149..bf6f2b9 100644 (file)
@@ -1594,7 +1594,7 @@ insertRelocationStores(iterator_range<Value::user_iterator> GCRelocs,
     if (!Relocate)
       continue;
 
-    Value *OriginalValue = const_cast<Value *>(Relocate->getDerivedPtr());
+    Value *OriginalValue = Relocate->getDerivedPtr();
     assert(AllocaMap.count(OriginalValue));
     Value *Alloca = AllocaMap[OriginalValue];