Patch by Koop Mast and Alex Arslan! Differential Revision: https://reviews.llvm.org/D28215 llvm-svn: 298798