Fix the order of destructors in LibLTOCodeGenerator
authorSteven Wu <stevenwu@apple.com>
Wed, 9 Dec 2015 03:37:51 +0000 (03:37 +0000)
committerSteven Wu <stevenwu@apple.com>
Wed, 9 Dec 2015 03:37:51 +0000 (03:37 +0000)
commit1208ef58cc26a928add3f5d797f6f1c5811bd1ed
treed2de89e0d56edfa7b921627c6c265b3edddc8e0d
parent65422bf239b9cb8806dec1f6045e366d50c06841
Fix the order of destructors in LibLTOCodeGenerator

Summary:
The order of destructors in LTOCodeGenerator gets changed in r254696.
It is possible for LTOCodeGenerator to have a MergedModule created in
the OwnedContext, in which case the module must be destructed before
the context.

Reviewers: rafael, dexonsmith

Subscribers: llvm-commits, joker.eph

Differential Revision: http://reviews.llvm.org/D15346

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255092 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/LTO/LTOCodeGenerator.h
tools/lto/lto.cpp