diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-14 22:18:18 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-14 22:18:18 +0000 |
commit | f24e57f2273f9162bd4809e2f3a43f6f16c2c5f5 (patch) | |
tree | f3c075d8812c927352d0deb5d9ac2433500449d2 | |
parent | 343ecbd6baf41ef68a6686a64012599f35fb5fc5 (diff) | |
download | bcm5719-llvm-f24e57f2273f9162bd4809e2f3a43f6f16c2c5f5.tar.gz bcm5719-llvm-f24e57f2273f9162bd4809e2f3a43f6f16c2c5f5.zip |
Improve r172468: const_cast is not needed here
llvm-svn: 172483
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonISelLowering.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp b/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp index 4c27d356bd0..1a0e5810515 100644 --- a/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp +++ b/llvm/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<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); } |