aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/CommandLine.cpp')
-rw-r--r--lib/Support/CommandLine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 5abeb8d2ef..9ae4cde1b2 100644
--- a/lib/Support/CommandLine.cpp
+++ b/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.