From: Dmitri Gribenko Date: Mon, 14 Jan 2013 22:18:18 +0000 (+0000) Subject: Improve r172468: const_cast is not needed here X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=510db8bcb959fa69a93c42b58cb3e0ab28d03825;p=oota-llvm.git Improve r172468: const_cast is not needed here git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172483 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Hexagon/HexagonISelLowering.cpp b/lib/Target/Hexagon/HexagonISelLowering.cpp index 4c27d356bd0..1a0e5810515 100644 --- a/lib/Target/Hexagon/HexagonISelLowering.cpp +++ b/lib/Target/Hexagon/HexagonISelLowering.cpp @@ -1016,9 +1016,8 @@ SDValue HexagonTargetLowering::LowerGLOBALADDRESS(SDValue Op, DebugLoc dl = Op.getDebugLoc(); Result = DAG.getTargetGlobalAddress(GV, dl, getPointerTy(), Offset); - HexagonTargetObjectFile &TLOF = - static_cast( - const_cast(getObjFileLowering())); + const HexagonTargetObjectFile &TLOF = + static_cast(getObjFileLowering()); if (TLOF.IsGlobalInSmallSection(GV, getTargetMachine())) { return DAG.getNode(HexagonISD::CONST32_GP, dl, getPointerTy(), Result); }