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

Chris Lattner lattner at cs.uiuc.edu
Mon Feb 14 11:17:44 PST 2005



Changes in directory llvm/lib/Support:

CommandLine.cpp updated: 1.57 -> 1.58
---
Log message:

Work around GCC PR19958: http://llvm.cs.uiuc.edu/PR19958 , which causes programs to sometimes crash after
printing help output or version info.


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

 CommandLine.cpp |    2 ++
 1 files changed, 2 insertions(+)


Index: llvm/lib/Support/CommandLine.cpp
diff -u llvm/lib/Support/CommandLine.cpp:1.57 llvm/lib/Support/CommandLine.cpp:1.58
--- llvm/lib/Support/CommandLine.cpp:1.57	Wed Nov 24 00:13:42 2004
+++ llvm/lib/Support/CommandLine.cpp	Mon Feb 14 13:17:29 2005
@@ -919,6 +919,7 @@
     MoreHelp().clear();
 
     // Halt the program since help information was printed
+    getOpts().clear();  // Don't bother making option dtors remove from map.
     exit(1);
   }
 };
@@ -929,6 +930,7 @@
     if (OptionWasSpecified) {
       std::cerr << "Low Level Virtual Machine (" << PACKAGE_NAME << ") " 
                 << PACKAGE_VERSION << " (see http://llvm.cs.uiuc.edu/)\n";
+      getOpts().clear();  // Don't bother making option dtors remove from map.
       exit(1);
     }
   }






More information about the llvm-commits mailing list