Page MenuHomePhabricator

[Bash-autocompletion] Follow up patch for D36782
AbandonedPublic

Authored by yamaguchi on Aug 28 2017, 2:04 AM.

Details

Summary

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.

Event Timeline

yamaguchi created this revision.Aug 28 2017, 2:04 AM
ruiu edited edge metadata.Aug 28 2017, 9:26 AM

Technically, this patch fixes your issue, but I don't think this is a good way of fixing it because parse() function now has an internal state which is not obvious to the user of the function. Can you review https://reviews.llvm.org/D37217? This is an alternative fix that doesn't use a static local variables.

yamaguchi abandoned this revision.Aug 28 2017, 8:22 PM

D37217 has already landed, so we don't need this anymore.