Skip to content
Commit 64e6529e authored by Devang Patel's avatar Devang Patel
Browse files

llvm.dbg.region.end() intrinsic is not required to be in _last_ basic block in...

llvm.dbg.region.end() intrinsic is not required to be in _last_ basic block in a function.  If that happens then any basic block that follows (lexically) the block with regin.end will not have scope info available.  LexicalScopeStack relies on processing basic block in CFG order, but this processing order is not guaranteed. Things get complicated when the optimizer gets a chance to optimizer IR with dbg intrinsics. 
Apply defensive patch to preserve at least one lexical scope till the end of function.

llvm-svn: 73282
parent 15201f19
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment