Fix MSAN failure on Function destruction
Summary: When Function is destroyed, GlobalValue base class is destroyed, then Value destructor would call use_empty, which ultimately attempts to downcast 'this' to GlobalValue. This is UB, and is caught my MSAN as accessing uninitialized memory. Call materialized_use_empty, which doesn't call assertModuleIsMaterializedImpl(). Reviewers: eugenis Reviewed By: eugenis Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74161 Patch by Antonio Maiorano.
Loading
Please register or sign in to comment