[PATCH] D41695: [Metadata] Extend 'count' field of DISubrange to take a metadata node

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 14:23:00 PST 2018


aprantl added a comment.

The scenario I was thinking of was with the previous format used for constant DIGlobalVariables. They used to have their constant value stored as a GlobalValue and when that GlobalValue was optimized away, we also lost it in the debug info. That situation however is different than what you are doing here, you are storing a ConstantInt directly, which I presume is never deleted by any IR transformation(?), so this should be safe.


https://reviews.llvm.org/D41695





More information about the llvm-commits mailing list