[llvm-commits] CVS: llvm/lib/Support/CommandLine.cpp

Tanya Brethour tbrethou at cs.uiuc.edu
Sat Nov 20 15:35:30 PST 2004



Changes in directory llvm/lib/Support:

CommandLine.cpp updated: 1.55 -> 1.56
---
Log message:

Fixed assertion from triggering. We need to check if the commandline map is empty before checking if an arg exists.


---
Diffs of the changes:  (+2 -0)

Index: llvm/lib/Support/CommandLine.cpp
diff -u llvm/lib/Support/CommandLine.cpp:1.55 llvm/lib/Support/CommandLine.cpp:1.56
--- llvm/lib/Support/CommandLine.cpp:1.55	Fri Nov 19 11:08:15 2004
+++ llvm/lib/Support/CommandLine.cpp	Sat Nov 20 17:35:20 2004
@@ -80,6 +80,8 @@
 // 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.






More information about the llvm-commits mailing list