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

Chris Lattner lattner at cs.uiuc.edu
Sun Jul 18 14:56:34 PDT 2004



Changes in directory llvm/lib/Support:

CommandLine.cpp updated: 1.45 -> 1.46

---
Log message:

Add a workaround for a GCC 3.3.2 bug


---
Diffs of the changes:  (+6 -1)

Index: llvm/lib/Support/CommandLine.cpp
diff -u llvm/lib/Support/CommandLine.cpp:1.45 llvm/lib/Support/CommandLine.cpp:1.46
--- llvm/lib/Support/CommandLine.cpp:1.45	Fri Jul  2 20:21:05 2004
+++ llvm/lib/Support/CommandLine.cpp	Sun Jul 18 16:56:20 2004
@@ -69,7 +69,12 @@
 // 
 static void RemoveArgument(const char *ArgName, Option *Opt) {
   if (CommandLineOptions == 0) return;
-  assert(getOption(ArgName) == Opt && "Arg not in map!");
+#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.
+  std::string Tmp = ArgName;
+  assert(getOption(Tmp) == Opt && "Arg not in map!");
+#endif
   CommandLineOptions->erase(ArgName);
   if (CommandLineOptions->empty()) {
     delete CommandLineOptions;





More information about the llvm-commits mailing list