From: Alkis Evlogimenos Date: Thu, 4 Mar 2004 17:50:44 +0000 (+0000) Subject: Hide variable from other functions. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5f65adda508bff0e9f40cf6013469c76fdcb1a09;p=oota-llvm.git Hide variable from other functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12118 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 8a6bd77e401..2c699d94888 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -48,8 +48,9 @@ static Option *getOption(const std::string &Str) { } static std::vector &getPositionalOpts() { - static std::vector Positional; - return Positional; + static std::vector *Positional = 0; + if (!Positional) Positional = new std::vector(); + return *Positional; } static void AddArgument(const char *ArgName, Option *Opt) {