From 565f7866ac9e0d597118cf6b7238c5305315af50 Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Fri, 29 Jan 2016 16:54:49 +0000 Subject: [PATCH] [RS4GC] Remove unnecessary const_cast; NFC GCRelocateInst::getDerivedPtr already returns a non-const llvm::Value pointer. llvm-svn: 259209 --- llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index cc89149..bf6f2b9 100644 --- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -1594,7 +1594,7 @@ insertRelocationStores(iterator_range GCRelocs, if (!Relocate) continue; - Value *OriginalValue = const_cast(Relocate->getDerivedPtr()); + Value *OriginalValue = Relocate->getDerivedPtr(); assert(AllocaMap.count(OriginalValue)); Value *Alloca = AllocaMap[OriginalValue]; -- 2.7.4