summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-02-14 19:17:29 +0000
committerChris Lattner <sabre@nondot.org>2005-02-14 19:17:29 +0000
commita3a55bf99706394e028f32337a99ff6492b5914b (patch)
tree63ec77b3add7940141948b0550f6ca51acd5ca7c /llvm/lib/Support/CommandLine.cpp
parent2b1e10031fcabd0559287aecb9e746b6e1d30836 (diff)
downloadbcm5719-llvm-a3a55bf99706394e028f32337a99ff6492b5914b.tar.gz
bcm5719-llvm-a3a55bf99706394e028f32337a99ff6492b5914b.zip
Work around GCC PR19958, which causes programs to sometimes crash after
printing help output or version info. llvm-svn: 20180
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp2
1 files changed, 2 insertions, 0 deletions
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);
}
}
OpenPOWER on IntegriCloud