[ORC] Bail out early if a replacement MaterializationUnit is empty.
The MU may define no symbols, but still contain a non-trivial destructor (e.g. an LLVM IR module that has been stripped of all externally visible definitions, but which still needs to lock its context to be destroyed). Bailing out early ensures that we destroy the unit outside the session lock, rather than under it which may cause deadlocks. Also adds some extra sanity-checking assertions.
Loading
Please sign in to comment