Reuse calculate_debuginfo_offset for fragments. This removes a little code duplication.
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.