This is an archive of the discontinued LLVM Phabricator instance.

[GlobalOpt] Correctly update metadata when localizing a global.
ClosedPublic

Authored by efriedma on Apr 26 2017, 12:17 PM.

Details

Summary

Just calling dropAllReferences leaves pointers to the ConstantExpr behind, so we would eventually crash with a null pointer dereference.

Diff Detail

Repository
rL LLVM

Event Timeline

efriedma created this revision.Apr 26 2017, 12:17 PM
jmolloy accepted this revision.Apr 27 2017, 12:59 AM

Ah, thanks Eli!

I remember when writing this code scratching my head about the precise method to call to properly unlink the constant.

This revision is now accepted and ready to land.Apr 27 2017, 12:59 AM
This revision was automatically updated to reflect the committed changes.