[llvm] r253660 - [Hexagon] Remove redundant local variable.

Tilmann Scheller via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 04:10:18 PST 2015


Author: tilmann
Date: Fri Nov 20 06:10:17 2015
New Revision: 253660

URL: http://llvm.org/viewvc/llvm-project?rev=253660&view=rev
Log:
[Hexagon] Remove redundant local variable.

Identified by the Clang static analyzer.

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

Modified: llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp?rev=253660&r1=253659&r2=253660&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp Fri Nov 20 06:10:17 2015
@@ -405,10 +405,8 @@ unsigned HexagonMCCodeEmitter::getExprOp
     return cast<MCConstantExpr>(ME)->getValue();
   }
   if (MK == MCExpr::Binary) {
-    unsigned Res;
-    Res = getExprOpValue(MI, MO, cast<MCBinaryExpr>(ME)->getLHS(), Fixups, STI);
-    Res +=
-        getExprOpValue(MI, MO, cast<MCBinaryExpr>(ME)->getRHS(), Fixups, STI);
+    getExprOpValue(MI, MO, cast<MCBinaryExpr>(ME)->getLHS(), Fixups, STI);
+    getExprOpValue(MI, MO, cast<MCBinaryExpr>(ME)->getRHS(), Fixups, STI);
     return 0;
   }
 




More information about the llvm-commits mailing list