This is a follow-up to https://reviews.llvm.org/D29349.
It turns out that NeedUpgradeToDIGlobalVariableExpression is always necessary when we encountered a version==0 record because it may always be referenced via a list of globals in a DICompileUnit. My tests weren't good enough to catch this though. To trigger this case, we need much older bitcode produced by LLVM around version 3.7.
Details
Details
Diff Detail
Diff Detail