Improve r172468: const_cast is not needed here
authorDmitri Gribenko <gribozavr@gmail.com>
Mon, 14 Jan 2013 22:18:18 +0000 (22:18 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Mon, 14 Jan 2013 22:18:18 +0000 (22:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172483 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Hexagon/HexagonISelLowering.cpp

index 4c27d356bd090aab9d958ccc39df03584bd38994..1a0e58105157f1ba22787cabde31f7c172348780 100644 (file)
@@ -1016,9 +1016,8 @@ SDValue HexagonTargetLowering::LowerGLOBALADDRESS(SDValue Op,
   DebugLoc dl = Op.getDebugLoc();
   Result = DAG.getTargetGlobalAddress(GV, dl, getPointerTy(), Offset);
 
-  HexagonTargetObjectFile &TLOF =
-    static_cast<HexagonTargetObjectFile &>(
-      const_cast<TargetLoweringObjectFile &>(getObjFileLowering()));
+  const HexagonTargetObjectFile &TLOF =
+      static_cast<const HexagonTargetObjectFile &>(getObjFileLowering());
   if (TLOF.IsGlobalInSmallSection(GV, getTargetMachine())) {
     return DAG.getNode(HexagonISD::CONST32_GP, dl, getPointerTy(), Result);
   }