[llvm] r261133 - [Hexagon] Replacing reference/dereference with reference cast.

Colin LeMahieu via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 10:50:22 PST 2016


Author: colinl
Date: Wed Feb 17 12:50:21 2016
New Revision: 261133

URL: http://llvm.org/viewvc/llvm-project?rev=261133&view=rev
Log:
[Hexagon] Replacing reference/dereference with reference cast.

Modified:
    llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.cpp

Modified: llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.cpp?rev=261133&r1=261132&r2=261133&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.cpp Wed Feb 17 12:50:21 2016
@@ -586,21 +586,21 @@ int64_t HexagonMCInstrInfo::minConstant(
 }
  
 void HexagonMCInstrInfo::setMustExtend(MCExpr &Expr, bool Val) {
-  HexagonMCExpr &HExpr = *llvm::cast<HexagonMCExpr>(&Expr);
+  HexagonMCExpr &HExpr = cast<HexagonMCExpr>(Expr);
   HExpr.setMustExtend(Val);
 }
 
 bool HexagonMCInstrInfo::mustExtend(MCExpr const &Expr) {
-  HexagonMCExpr const &HExpr = *llvm::cast<HexagonMCExpr>(&Expr);
+  HexagonMCExpr const &HExpr = cast<HexagonMCExpr>(Expr);
   return HExpr.mustExtend();
 }
 void HexagonMCInstrInfo::setMustNotExtend(MCExpr const &Expr, bool Val) {
   HexagonMCExpr &HExpr =
-      const_cast<HexagonMCExpr &>(*llvm::cast<HexagonMCExpr>(&Expr));
+      const_cast<HexagonMCExpr &>(cast<HexagonMCExpr>(Expr));
   HExpr.setMustNotExtend(Val);
 }
 bool HexagonMCInstrInfo::mustNotExtend(MCExpr const &Expr) {
-  HexagonMCExpr const &HExpr = *llvm::cast<HexagonMCExpr>(&Expr);
+  HexagonMCExpr const &HExpr = cast<HexagonMCExpr>(Expr);
   return HExpr.mustNotExtend();
 }
 




More information about the llvm-commits mailing list