diff options
author | Rui Ueyama <ruiu@google.com> | 2017-08-28 20:46:30 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-08-28 20:46:30 +0000 |
commit | affb40e9d23f70fad605fe9264229b5a705f915c (patch) | |
tree | 451c7a0b40d7216f45213a4ba312dfb193860942 /llvm/tools/llvm-rc/ResourceScriptStmt.cpp | |
parent | 4728184342a6240ed866c1ce8d9e421b67bc20cf (diff) | |
download | bcm5719-llvm-affb40e9d23f70fad605fe9264229b5a705f915c.tar.gz bcm5719-llvm-affb40e9d23f70fad605fe9264229b5a705f915c.zip |
Keep an instance of COFFOptTable alive as long as InputArgList is alive.
Summary:
ArgParser created an instance of COFFOptTable on stack to use it to
parser command line arguments. Parsed arguments were then returned from
the function as InputArgList. This was safe because InputArgList referred
only statically-allocated InfoTable.
That is not a safe assumption after https://reviews.llvm.org/D36782,
which changes the type of its internal table from ArrayRef to std::vector.
To make lld work with that patch, we need to keep an instance of
COFFOptTable at least as long as an InputArgList is alive. This patch
does that.
Reviewers: yamaguchi
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D37217
llvm-svn: 311930
Diffstat (limited to 'llvm/tools/llvm-rc/ResourceScriptStmt.cpp')
0 files changed, 0 insertions, 0 deletions