Sink an otherwise unused variable's initializer into the asserts that
authorChandler Carruth <chandlerc@gmail.com>
Mon, 24 Oct 2011 16:51:55 +0000 (16:51 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 24 Oct 2011 16:51:55 +0000 (16:51 +0000)
used it. Fixes an unused variable warning from GCC on release builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142799 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineBlockPlacement.cpp

index 32eb70e21ff2738a0be50b118ac38dd64f317d1c..21582b94c5320a9318ed2397172c9038f5bb8459 100644 (file)
@@ -395,9 +395,8 @@ void MachineBlockPlacement::buildCFGChains(MachineFunction &F) {
 
 void MachineBlockPlacement::placeChainsTopologically(MachineFunction &F) {
   MachineBasicBlock *EntryB = &F.front();
-  BlockChain *EntryChain = BlockToChain[EntryB];
-  assert(EntryChain && "Missing chain for entry block");
-  assert(*EntryChain->begin() == EntryB &&
+  assert(BlockToChain[EntryB] && "Missing chain for entry block");
+  assert(*BlockToChain[EntryB]->begin() == EntryB &&
          "Entry block is not the head of the entry block chain");
 
   // Walk the blocks in RPO, and insert each block for a chain in order the