Work around GCC PR19958, which causes programs to sometimes crash after

printing help output or version info.

llvm-svn: 20180
This commit is contained in:
Chris Lattner 2005-02-14 19:17:29 +00:00
parent 2b1e10031f
commit a3a55bf997
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}
}