[llvm-dev] nullptr bit-value for DebugInfo in non-default address spaces
Jeremy Morse via llvm-dev
llvm-dev at lists.llvm.org
Tue Dec 4 06:47:43 PST 2018
It recently transpired that LLVM doesn't correctly preserve debugging
information when null pointer constants are assigned to variables , with
the debug records getting dropped by SelectionDAG. Fixing that  raises a
few questions about the bit-value of null in different address spaces, so
I'd like to ask:
* Can we just assume that null is zero-valued for all address spaces?
* If not, are there APIs available for determining an address spaces'
What's permissible / disallowed for address spaces is unclear to me.
Various comments around the code base suggest that nullptr is always zero
for address space zero; I'm not aware of rules for other address spaces.
Without further information, the current solution is to have non-zero
address space nulls marked as "optimized out".
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev