Skip to content
Commit affb40e9 authored by Rui Ueyama's avatar Rui Ueyama
Browse files

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
parent 47281843
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment