diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-10-28 00:38:08 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-10-28 00:38:08 +0000 |
commit | 524b86f03f9e517aad82e8205854a663e576a192 (patch) | |
tree | 846d77e5c3d484fb3093d12ebf0b37e3d8e3a033 | |
parent | 2149470b6aca57e9ca2b7fb80416932ca75bbff7 (diff) |
Call llvm_shutdown() on (normal) termination. This makes --time-passes usable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58308 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Driver/clang.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp index ac5a4b281a..765c05b26d 100644 --- a/Driver/clang.cpp +++ b/Driver/clang.cpp @@ -45,6 +45,7 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/Config/config.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/ManagedStatic.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/System/Host.h" #include "llvm/System/Path.h" @@ -1534,5 +1535,9 @@ int main(int argc, char **argv) { if (VerifyDiagnostics) return 0; + // Managed static deconstruction. Useful for making things like + // -time-passes usable. + llvm::llvm_shutdown(); + return HadErrors || (Diags.getNumErrors() != 0); } |