The original version of the code in XRayInstrumentation.cpp assumed that
functions may not have empty machine basic blocks (or that the first one
couldn't be). This change addresses that by special-casing that specific
situation.
We provide a .mir test-case to make sure we're handling this
appropriately.
Fixes llvm.org/PR31424.
Unrelated formatting change, please land in a separate commit.