Reduce scope of variable to silence cppcheck warning. NFC
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 9 Nov 2019 22:10:09 +0000 (22:10 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 9 Nov 2019 22:10:09 +0000 (22:10 +0000)
llvm/utils/TableGen/FixedLenDecoderEmitter.cpp

index ac69b43..21ec589 100644 (file)
@@ -1058,10 +1058,9 @@ unsigned FilterChooser::getIslands(std::vector<unsigned> &StartBits,
   // 1: Water (the bit value does not affect decoding)
   // 2: Island (well-known bit value needed for decoding)
   int State = 0;
-  int64_t Val = -1;
 
   for (unsigned i = 0; i < BitWidth; ++i) {
-    Val = Value(Insn[i]);
+    int64_t Val = Value(Insn[i]);
     bool Filtered = PositionFiltered(i);
     switch (State) {
     default: llvm_unreachable("Unreachable code!");