From f33d6df89997d48f8ecb747431a2043b559ec88a Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Wed, 18 Sep 2013 23:31:16 +0000 Subject: Encapsulate PassManager debug flags to avoid static init and cxa_exit. This puts all the global PassManager debugging flags, like -print-after-all and -time-passes, behind a managed static. This eliminates their static initializers and, more importantly, exit-time destructors. The only behavioral change I anticipate is that tools need to initialize the PassManager before parsing the command line in order to export these options, which makes sense. Tools that already initialize the standard passes (opt/llc) don't need to do anything new. llvm-svn: 190974 --- llvm/lib/IR/Core.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/IR/Core.cpp') diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp index 95c516a2511..749ae601461 100644 --- a/llvm/lib/IR/Core.cpp +++ b/llvm/lib/IR/Core.cpp @@ -40,6 +40,7 @@ using namespace llvm; void llvm::initializeCore(PassRegistry &Registry) { + initializePassManager(); initializeDominatorTreePass(Registry); initializePrintModulePassPass(Registry); initializePrintFunctionPassPass(Registry); -- cgit v1.2.3