Prior to this while it would delete the dead DIGlobalVariables, it would
leave dead DICompileUnits and everything referenced therefrom. For a bit
bitcode file with thousands of compile units those dead nodes easily
outnumbered the real ones. Clean that up.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Can you add a CU that only has a DIGlobalVariableExpression with a DIExpression(DW_OP_constu 0, DW_OP_stack_value) to your testcase and verify that it survives?
Otherwise this LGTM.
lib/Transforms/IPO/StripSymbols.cpp | ||
---|---|---|
327 ↗ | (On Diff #94267) | . at the end :-) |
353 ↗ | (On Diff #94267) | remove extra parens? |
373 ↗ | (On Diff #94267) | It might be faster to just call clearOperands() instead of deleting the entire node? |