Michael137 wrote: > Hmm, I can't quite tell from the test case updates in the patch, at least at > a glance: How does this get encoded at the IR level? Do we end up with two > DIGlobalVariableExpressions? One with the constant value expresison, and one > that references the actual global variable? Or somehow encode both in one?
My understanding was that the DIExpression parameter to DIGlobalVariableExpression was empty for global variables with locations. So the patch just encodes the constant into that expression if it's otherwise empty. My plan was to make [DwarfCompileUnit](https://llvm.org/doxygen/DwarfCompileUnit_8cpp_source.html#l00203) support global variables with locations *and* constants, which it currently assumes doesn't happen. Let me know if I missed something here https://github.com/llvm/llvm-project/pull/72730 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits