aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/JSBackend/JSBackend.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-08 10:28:55 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-08 10:28:55 -0800
commit020f597d69530673f0845803e7762a3ebbcca852 (patch)
tree94d1aa9cbf8c2a3ba7f1e3907392ce1348bbe1b5 /lib/Target/JSBackend/JSBackend.cpp
parent88e3e6c307f0879687d02e062a7a3618abf74075 (diff)
avoid compiler warning on variable def
Diffstat (limited to 'lib/Target/JSBackend/JSBackend.cpp')
-rw-r--r--lib/Target/JSBackend/JSBackend.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp
index 197cdf7f0f..6f748abfe6 100644
--- a/lib/Target/JSBackend/JSBackend.cpp
+++ b/lib/Target/JSBackend/JSBackend.cpp
@@ -805,7 +805,8 @@ bool JSWriter::generateSIMDInstruction(const std::string &iName, const Instructi
assert(VT->getNumElements() == 4); \
UsesSIMD = true;
- if (VectorType *VT = dyn_cast<VectorType>(I->getType())) {
+ VectorType *VT;
+ if ((VT = dyn_cast<VectorType>(I->getType()))) {
// vector-producing instructions
CHECK_VECTOR(VT);
@@ -858,7 +859,6 @@ bool JSWriter::generateSIMDInstruction(const std::string &iName, const Instructi
return true;
} else {
// vector-consuming instructions
- VectorType *VT;
if (I->getOpcode() == Instruction::Store && (VT = dyn_cast<VectorType>(I->getOperand(0)->getType())) && VT->isVectorTy()) {
CHECK_VECTOR(VT);
std::string PS = getOpName(I->getOperand(1));