[llvm] r259209 - [RS4GC] Remove unnecessary const_cast; NFC

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 08:54:49 PST 2016


Author: sanjoy
Date: Fri Jan 29 10:54:49 2016
New Revision: 259209

URL: http://llvm.org/viewvc/llvm-project?rev=259209&view=rev
Log:
[RS4GC] Remove unnecessary const_cast; NFC

GCRelocateInst::getDerivedPtr already returns a non-const llvm::Value
pointer.

Modified:
    llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp?rev=259209&r1=259208&r2=259209&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp Fri Jan 29 10:54:49 2016
@@ -1594,7 +1594,7 @@ insertRelocationStores(iterator_range<Va
     if (!Relocate)
       continue;
 
-    Value *OriginalValue = const_cast<Value *>(Relocate->getDerivedPtr());
+    Value *OriginalValue = Relocate->getDerivedPtr();
     assert(AllocaMap.count(OriginalValue));
     Value *Alloca = AllocaMap[OriginalValue];
 




More information about the llvm-commits mailing list