[llvm-commits] [llvm] r172468 - /llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp
David Greene
greened at obbligato.org
Mon Jan 14 13:04:42 PST 2013
Author: greened
Date: Mon Jan 14 15:04:42 2013
New Revision: 172468
URL: http://llvm.org/viewvc/llvm-project?rev=172468&view=rev
Log:
Fix Another Cast
Properly cast code to eliminate cast-away-const errors.
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=172468&r1=172467&r2=172468&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp Mon Jan 14 15:04:42 2013
@@ -1017,7 +1017,8 @@
Result = DAG.getTargetGlobalAddress(GV, dl, getPointerTy(), Offset);
HexagonTargetObjectFile &TLOF =
- (HexagonTargetObjectFile&)getObjFileLowering();
+ static_cast<HexagonTargetObjectFile &>(
+ const_cast<TargetLoweringObjectFile &>(getObjFileLowering()));
if (TLOF.IsGlobalInSmallSection(GV, getTargetMachine())) {
return DAG.getNode(HexagonISD::CONST32_GP, dl, getPointerTy(), Result);
}
More information about the llvm-commits
mailing list