diff options
author | Chris Lattner <sabre@nondot.org> | 2005-02-14 19:17:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-02-14 19:17:29 +0000 |
commit | a92d12c053510bdad196965a6bac3168d807802e (patch) | |
tree | 2e1ba2c12f323638ebe8cb0dd9415b51586d96cd /lib/Support/CommandLine.cpp | |
parent | b70aaa62b6b9b89f7bcd771e3c0656ddcae09757 (diff) |
Work around GCC PR19958, which causes programs to sometimes crash after
printing help output or version info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20180 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/CommandLine.cpp')
-rw-r--r-- | lib/Support/CommandLine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 52e4bbded0..f73ec6d878 100644 --- a/lib/Support/CommandLine.cpp +++ b/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); } } |