summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2004-11-20 23:35:20 +0000
committerTanya Lattner <tonic@nondot.org>2004-11-20 23:35:20 +0000
commitd27b014459286b7c567325407aa580a9563d3e4d (patch)
tree4dca67648ade9977d1319b0f0d4652fe2f70ee18 /llvm/lib/Support/CommandLine.cpp
parent9afecaf4ffdeb3380463bafe6ac796a5e436dad7 (diff)
downloadbcm5719-llvm-d27b014459286b7c567325407aa580a9563d3e4d.tar.gz
bcm5719-llvm-d27b014459286b7c567325407aa580a9563d3e4d.zip
Fixed assertion from triggering. We need to check if the commandline map is empty before checking if an arg exists.
llvm-svn: 18057
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 5abeb8d2ef1..9ae4cde1b21 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -80,6 +80,8 @@ static void AddArgument(const char *ArgName, Option *Opt) {
// options have already been processed and the map has been deleted!
//
static void RemoveArgument(const char *ArgName, Option *Opt) {
+ if(getOpts().empty()) return;
+
#ifndef NDEBUG
// This disgusting HACK is brought to you courtesy of GCC 3.3.2, which ICE's
// If we pass ArgName directly into getOption here.
OpenPOWER on IntegriCloud