From a3a55bf99706394e028f32337a99ff6492b5914b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 14 Feb 2005 19:17:29 +0000 Subject: Work around GCC PR19958, which causes programs to sometimes crash after printing help output or version info. llvm-svn: 20180 --- llvm/lib/Support/CommandLine.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Support/CommandLine.cpp') diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 52e4bbded02..f73ec6d8780 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -919,6 +919,7 @@ public: MoreHelp().clear(); // Halt the program since help information was printed + getOpts().clear(); // Don't bother making option dtors remove from map. exit(1); } }; @@ -929,6 +930,7 @@ public: if (OptionWasSpecified) { std::cerr << "Low Level Virtual Machine (" << PACKAGE_NAME << ") " << PACKAGE_VERSION << " (see http://llvm.cs.uiuc.edu/)\n"; + getOpts().clear(); // Don't bother making option dtors remove from map. exit(1); } } -- cgit v1.2.3