forked from OSchip/llvm-project
R600/SI: Check for empty stack in SIAnnotateControlFlow::isTopOfStack
Fixes assertion failure in newly added lit test. Might just be a bandaid that needs to be revisited. llvm-svn: 175139
This commit is contained in:
parent
51d5eb2f63
commit
ae0a403dab
|
@ -147,7 +147,7 @@ bool SIAnnotateControlFlow::doInitialization(Module &M) {
|
|||
|
||||
/// \brief Is BB the last block saved on the stack ?
|
||||
bool SIAnnotateControlFlow::isTopOfStack(BasicBlock *BB) {
|
||||
return Stack.back().first == BB;
|
||||
return !Stack.empty() && Stack.back().first == BB;
|
||||
}
|
||||
|
||||
/// \brief Pop the last saved value from the control flow stack
|
||||
|
|
Loading…
Reference in New Issue