[PATCH] D37203: [Bash-autocompletion] Follow up patch for D36782

Yuka Takahashi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 28 02:04:51 PDT 2017

yamaguchi created this revision.

https://reviews.llvm.org/D36782 broke lld buildbots, because I've changed OptionInfo's type
from ArrayRef to std::vector, so it became a copy, not a reference.
In this patch, I changed Table to static, so that it won't be freed
after the return. However, I'm not sure if this is Ok for lld, because
it requires this function to be called atomic.



Index: lld/COFF/DriverUtils.cpp
--- lld/COFF/DriverUtils.cpp
+++ lld/COFF/DriverUtils.cpp
@@ -727,7 +727,7 @@
   std::vector<const char *> Argv = replaceResponseFiles(ArgsArr);
   // Make InputArgList from string vectors.
-  COFFOptTable Table;
+  static COFFOptTable Table;
   unsigned MissingIndex;
   unsigned MissingCount;
   opt::InputArgList Args = Table.ParseArgs(Argv, MissingIndex, MissingCount);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37203.112859.patch
Type: text/x-patch
Size: 476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170828/bf5a0772/attachment.bin>

More information about the cfe-commits mailing list