Fix crash in clang.
authorZachary Turner <zturner@google.com>
Tue, 3 Jul 2018 18:12:39 +0000 (18:12 +0000)
committerZachary Turner <zturner@google.com>
Tue, 3 Jul 2018 18:12:39 +0000 (18:12 +0000)
commit4ca9432defc3c80d8247d16e0b7f0fb15c0f49f2
treef76d05e9aaa76ca7badde5a799605ebaf7090665
parentadc51ae4255044fe3ba50768013d7f47b2102c79
Fix crash in clang.

This happened during a recent refactor.  toStringRefArray() returns
a vector<StringRef>, which was being implicitly converted to an
ArrayRef<StringRef>, and then the vector was immediately being
destroyed, so the ArrayRef<> was losing its backing storage.
Fix this by making sure the vector gets permanent storage.

llvm-svn: 336219
clang/lib/Driver/Job.cpp