From a46730f103822178fd0ff96b7b8a40df4beec2c8 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259209 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index cc89149f2de..bf6f2b91763 100644 --- a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/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.11.0