You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make finding the corresponding BasicBlock more robust.
In a previous PR we modified the .llvm_bb_addr_map section, adding the
original basic block index. This commit improves that code in two ways:
1) Catch the case where MachineBasicBlock::getBasicBlock() returns a
null pointer. To quote the documentation:
> Note that this may be NULL if this instance does not correspond
> directly to an LLVM basic block.
We use the block index u64::MAX to encode this condition (note that
although the field in the section is uleb128, LLVM only allows block
indices that fit in a u64).
An upcoming change to yk will check for this condition at runtime.
2) Currently if a block isn't found, then the resulting block index is
incorrect: The last index used in the loop is erroneously used.This
commit causes an error at compile time instead.
0 commit comments