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.
https://reviews.llvm.org/D37203 Files: lld/COFF/DriverUtils.cpp 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);
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);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits