Please backport https://reviews.llvm.org/rGf55ab6f90b7317a6bb85303a6102702bdae1199e to the LLVM 10.x branch. We've recently found that this issue affects Rust in some cases (ref https://github.com/rust-lang/rust/pull/48300#issuecomment-579424438).
The patch doesn't apply cleanly on the branch. Adrian, can you please help cherry-pick this (with -x) and push it to the 10.x branch?
It applies if I take 7b0d58e339b271e3b1d9dc14b781b57fa0262e3a first. Pushed to 10.x as 7751f0c191518b377d9b71bdd17281abec83945a and cab81521b5afc2d4295f988aa5f087cbaeefb981