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

Alkis Evlogimenos alkis at cs.uiuc.edu
Thu Mar 4 11:51:02 PST 2004


Changes in directory llvm/lib/Support:

CommandLine.cpp updated: 1.42 -> 1.43

---
Log message:

Hide variable from other functions.


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

Index: llvm/lib/Support/CommandLine.cpp
diff -u llvm/lib/Support/CommandLine.cpp:1.42 llvm/lib/Support/CommandLine.cpp:1.43
--- llvm/lib/Support/CommandLine.cpp:1.42	Sun Dec 14 15:35:53 2003
+++ llvm/lib/Support/CommandLine.cpp	Thu Mar  4 11:50:44 2004
@@ -48,8 +48,9 @@
 }
 
 static std::vector<Option*> &getPositionalOpts() {
-  static std::vector<Option*> Positional;
-  return Positional;
+  static std::vector<Option*> *Positional = 0;
+  if (!Positional) Positional = new std::vector<Option*>();
+  return *Positional;
 }
 
 static void AddArgument(const char *ArgName, Option *Opt) {





More information about the llvm-commits mailing list