[llvm-commits] [llvm] r172483 - /llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp

Dmitri Gribenko gribozavr at gmail.com
Mon Jan 14 14:18:18 PST 2013


Author: gribozavr
Date: Mon Jan 14 16:18:18 2013
New Revision: 172483

URL: http://llvm.org/viewvc/llvm-project?rev=172483&view=rev
Log:
Improve r172468: const_cast is not needed here

Modified:
    llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp

Modified: llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp?rev=172483&r1=172482&r2=172483&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp Mon Jan 14 16:18:18 2013
@@ -1016,9 +1016,8 @@
   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);
   }





More information about the llvm-commits mailing list