hiraditya added a comment. I had to revert the patch because this test case was failing. The problem was that the destructors have different return type for different targets. So I'll modify the testcase and put the patch back in. Repository: rL LLVM https://reviews.llvm.org/D24682