This is very preliminary support, but it seems to work for the most common case. When observing more/different test cases, we can work on generalizing this. llvm-svn: 240955
place tests here