[llvm-commits] CVS: llvm/include/Support/CommandLine.h

Brian Gaeke gaeke at niobe.cs.uiuc.edu
Fri Aug 15 16:07:02 PDT 2003


Changes in directory llvm/include/Support:

CommandLine.h updated: 1.22 -> 1.23

---
Log message:

lib/Support/CommandLine.cpp:
Many changes suggested by Chris. It's okay, I'll recover from the emotional
damage...maybe someday. :-)

Collapse ParseCStringVector into ParseStringVector.  Comment it.
Make it take a const input.
Use std::string::npos instead of -1 (what a mouthful!)
Make ParseEnvironmentOptions take const inputs.
Check its args at the very beginning.
Strdup all the contents of newArgv and free them all at the end.

include/Support/CommandLine.h:
Constify progName and envVar arguments to ParseEnvironmentOptions().


---
Diffs of the changes:

Index: llvm/include/Support/CommandLine.h
diff -u llvm/include/Support/CommandLine.h:1.22 llvm/include/Support/CommandLine.h:1.23
--- llvm/include/Support/CommandLine.h:1.22	Thu Aug 14 17:04:41 2003
+++ llvm/include/Support/CommandLine.h	Fri Aug 15 16:05:55 2003
@@ -35,7 +35,7 @@
 // ParseEnvironmentOptions - Environment variable option processing alternate
 //                           entry point.
 //
-void ParseEnvironmentOptions(char *progName, char *envvar,
+void ParseEnvironmentOptions(const char *progName, const char *envvar,
                              const char *Overview = 0);
 
 //===----------------------------------------------------------------------===//





More information about the llvm-commits mailing list