]> granicus.if.org Git - clang/commit
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)
commita0c03f2df39aa547e4182dcf632ba1c1d533da4e
tree87d1b1480b81585fb532a41df6f47184940ee476
parent82cfb485f0e0e3174b95881c5a6e5d080e91b916
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@336219 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/Job.cpp