From 82c2290e0f4ec44c56ef61f9db96093df7e8b990 Mon Sep 17 00:00:00 2001 From: Kyle Butt Date: Tue, 28 Jun 2016 22:50:54 +0000 Subject: [PATCH] Codegen: [MBP] Add messages to asserts. NFC llvm-svn: 274075 --- llvm/lib/CodeGen/MachineBlockPlacement.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index 9d6682e4bb1e..555fde623367 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp @@ -855,9 +855,10 @@ void MachineBlockPlacement::buildChain( BlockFilter); BB = *std::prev(Chain.end()); for (;;) { - assert(BB); - assert(BlockToChain[BB] == &Chain); - assert(*std::prev(Chain.end()) == BB); + assert(BB && "null block found at end of chain in loop."); + assert(BlockToChain[BB] == &Chain && "BlockToChainMap mis-match in loop."); + assert(*std::prev(Chain.end()) == BB && "BB Not found at end of chain."); + // Look for the best viable successor if there is one to place immediately // after this block.