Fixed assertion from triggering. We need to check if the commandline map is empty...
authorTanya Lattner <tonic@nondot.org>
Sat, 20 Nov 2004 23:35:20 +0000 (23:35 +0000)
committerTanya Lattner <tonic@nondot.org>
Sat, 20 Nov 2004 23:35:20 +0000 (23:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18057 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/CommandLine.cpp

index 5abeb8d2ef19fdc2797da2baee991b44a929fba7..9ae4cde1b219dc854350290eb687bfeba3f0aae4 100644 (file)
@@ -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.