mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-23 02:44:32 +00:00
d73d6a2ee6
When an empty comment is present in an assembly file, the compiler will crash because it checks the first character for '\n' or '\r'. The fix consists of also checking if the string is empty before accessing the *front* method of the StringRef. A test is included for the x86 target, but this issue is reproducible with other targets as well. Patch by Alexandru Guduleasa! Reviewers: niravd, grosbach, llvm-commits Reviewed By: niravd Differential Revision: https://reviews.llvm.org/D33993 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305077 91177308-0d34-0410-b5e6-96231b3b80d8