diff options
author | Jason Molenda <jmolenda@apple.com> | 2018-06-25 23:45:39 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2018-06-25 23:45:39 +0000 |
commit | 32a914256e6a8e8d1b2c78c71def1d9cb7042371 (patch) | |
tree | 182b7c046073865d939b799ef0c09be6f42086ed /llvm/unittests/ADT/APIntTest.cpp | |
parent | f74ef4b1e634f094654de3b7b3567fa747c7e8a8 (diff) | |
download | bcm5719-llvm-32a914256e6a8e8d1b2c78c71def1d9cb7042371.tar.gz bcm5719-llvm-32a914256e6a8e8d1b2c78c71def1d9cb7042371.zip |
A little cleanup in ObjectFileMachO::GetSDKVersion.
This method does one of two things:
1. finds a minimum os deployment version # in a Mach-O load
command and saves the three parts in the m_sdk_version, or
2. finds no valid min os version # load command, pushes a
sentinel value on the m_sdk_version vector so we don't search
the same load commands multiple times.
There was a little bug when we found a load command with
a version of 0.0.0 - the method would not add anything to
the m_sdk_version vector but would declare that a success.
It would not push the sentinel value to the vector.
There was code later in the method which assumed that
the vector always had a sentinel value, at least, and that
code could crash when this method was called back when
evaluating a Swift expression. (these version #'s are
fetched lazily so it wouldn't happen when the object file
was parsed, only when doing an expression that needed
the version #).
<rdar://problem/41372699>
llvm-svn: 335556
Diffstat (limited to 'llvm/unittests/ADT/APIntTest.cpp')
0 files changed, 0 insertions, 0 deletions