While investigating the failures of symbolize_pc.cpp and symbolize_pc_inline.cpp on SPARC (both Solaris and Linux), I noticed that __builtin_extract_return_addr is a no-op in clang on all targets, while gcc has non-default implementations for arm, mips, s390, and sparc.
This patch provides the SPARC implementation. For background see SparcISelLowering.cpp (SparcTargetLowering::LowerReturn_32) , the SPARC psABI p.3-12, %i7 and p.3-16/17, and SCD 2.4.1, p.3P-10, %i7 and p.3P-15.
Tested (after enabling the sanitizer_common tests on SPARC) on sparcv9-sun-solaris2.11.