summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineBlockPlacement.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-10-24 16:51:55 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-10-24 16:51:55 +0000
commite4617c04c863b2fb342d08408d45ba3bf50b97a0 (patch)
treeda20373340c07ca7b034e4f0da039d2e2632aadf /lib/CodeGen/MachineBlockPlacement.cpp
parent13b10731abfc006fce790c5c8205cd24c7d67de8 (diff)
downloadllvm-e4617c04c863b2fb342d08408d45ba3bf50b97a0.tar.gz
llvm-e4617c04c863b2fb342d08408d45ba3bf50b97a0.tar.bz2
llvm-e4617c04c863b2fb342d08408d45ba3bf50b97a0.tar.xz
Sink an otherwise unused variable's initializer into the asserts that
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
Diffstat (limited to 'lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r--lib/CodeGen/MachineBlockPlacement.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/MachineBlockPlacement.cpp b/lib/CodeGen/MachineBlockPlacement.cpp
index 32eb70e21f..21582b94c5 100644
--- a/lib/CodeGen/MachineBlockPlacement.cpp
+++ b/lib/CodeGen/MachineBlockPlacement.cpp
@@ -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