diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2019-12-20 12:38:49 +0100 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2019-12-20 12:52:06 +0100 |
| commit | b2371791fc74b2ecad7f608ff8592ec512d098e6 (patch) | |
| tree | 9a15db5bdc9a1aa649c619324dc2ed9f5442bac5 /llvm/lib | |
| parent | be2b7ea89ab43d6827634fbdbbd2661e1f242527 (diff) | |
| download | bcm5719-llvm-b2371791fc74b2ecad7f608ff8592ec512d098e6.tar.gz bcm5719-llvm-b2371791fc74b2ecad7f608ff8592ec512d098e6.zip | |
[lldb] Make that we can call HostInfo::Initialize and HostInfo::Terminate multiple times
Summary:
HostInfo's state isn't actually fully rested after calling ::Terminate. Currently we only reset the
values of all the `HostInfoBaseFields` but not all the variables with static storage that
keep track of whether the fields need to be initialised. This breaks random unit tests as running
them twice (or running multiple test instances in one run) will cause that the second time
we ask HostInfo for any information we get the default value back for any field.
This patch moves all the once_flag's into the `HostInfoBaseFields` so that they also get reseted
by ::Terminate and removes all the `success` bools. We should also rewrite half this code but
I would prefer if my tests aren't broken over the holidays so let's just put some duct tape on it
for now.
Reviewers: labath
Reviewed By: labath
Subscribers: abidh, JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71748
Diffstat (limited to 'llvm/lib')
0 files changed, 0 insertions, 0 deletions

