llvm-profgen gives error message when the input binary contains premature terminator in .debug_aranges section. These zero length items point to some rodata with zero size type in embed Rust Library. Considering Zero-Sized Types are a valid feature in Rust. They are not real error. This change makes the "error:" message into a warning to avoid misleading.
Why do we still want a warning on such case? because it doesn't follow dwarf standard. https://bugs.llvm.org/show_bug.cgi?id=46805 contains early discussion.
Nice. This is much simpler. That being said, it would be nice if we could avoid this # REQUIRES line by using YAML as the input still. I believe the following is all that would be needed:
If I'm not mistaken, you should be able even to drop the foo section entirely though.