LTO+Debug Info: revert r182791.

Since the testing case uses ref_addr, which requires version 3+ to work,
we will solve the dwarf version issue first.

This patch also causes failures in one of the bots. I will update the patch
accordingly in my next attempt.

rdar://13926659


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182867 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify logic by using the appropriate functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182869 91177308-0d34-0410-b5e6-96231b3b80d8